1 15 16 package org.objectweb.jac.core.dist.corba; 17 18 import org.objectweb.jac.core.utils.Lib; 19 import org.objectweb.jac.core.dist.RemoteContainer; 20 21 import java.util.Vector ; 22 23 24 33 34 public class CORBARemoteContainer 35 extends RemoteContainer implements CORBARemoteContainerInterfOperations { 36 37 42 43 public CORBARemoteContainer( boolean verbose ) { 44 super(verbose); 45 } 46 47 48 54 55 public CORBARemoteContainer( String className, boolean verbose ) { 56 super(className,verbose); 57 } 58 59 60 73 74 public int 75 instantiates( 76 String className, byte[][] args, byte[] classes, 77 String [] fields, byte[][] state 78 ) { 79 80 87 88 Object [] argsObjects = null; 89 if ( args.length != 0 ) { 90 argsObjects = new Object [ args.length ]; 91 for ( int i=0 ; i < args.length ; i++ ) 92 argsObjects[i] = Lib.deserialize( args[i] ); 93 } 94 95 if ( fields.length == 0 ) fields = null; 96 97 Object [] stateObjects = null; 98 if ( state.length != 0 ) { 99 stateObjects = new Object [ state.length ]; 100 for ( int i=0 ; i < state.length ; i++ ) 101 stateObjects[i] = Lib.deserialize( state[i] ); 102 } 103 104 return 105 super.instantiates( 106 className, args, (Vector ) Lib.deserialize(classes), 107 fields, stateObjects 108 ); 109 } 110 111 112 119 120 public void copy( int index, String [] fields, byte[][] state ) { 121 122 Object [] stateObjects = new Object [ state.length ]; 123 for ( int i=0 ; i < state.length ; i++ ) 124 stateObjects[i] = Lib.deserialize( state[i] ); 125 126 super.copy( index, fields, stateObjects ); 127 } 128 129 130 141 142 public byte[] invoke( int index, String methodName, byte[][] methodArgs ) { 143 144 Object [] methodArgsObjects = new Object [ methodArgs.length ]; 145 for ( int i=0 ; i < methodArgs.length ; i++ ) 146 methodArgsObjects[i] = Lib.deserialize( methodArgs[i] ); 147 148 Object result = super.invoke( index, methodName, methodArgsObjects ); 149 150 return Lib.serialize(result); 151 } 152 153 154 174 175 public byte[] getClientStubWrappingChain2( int index ) { 176 177 return Lib.serialize( super.getClientStubWrappingChain(index) ); 178 } 179 180 } 181 | Popular Tags |