1 package test.interceptor.client_flow; 2 3 import org.jacorb.orb.portableInterceptor.*; 4 import org.omg.PortableInterceptor.*; 5 import java.io.*; 6 15 16 public class ClientInitializer 17 extends org.jacorb.orb.LocalityConstrainedObject 18 implements ORBInitializer 19 { 20 public ClientInitializer() 21 { 22 } 23 24 26 30 public void pre_init(ORBInitInfo info) 31 { 32 } 33 34 38 public void post_init(ORBInitInfo info) 39 { 40 try 41 { 42 info.add_client_request_interceptor( new ClientInterceptorA() ); 43 44 BufferedReader br = 45 new BufferedReader( new FileReader( info.arguments()[0] )); 46 47 org.omg.CORBA.Object obj = 49 ((ORBInitInfoImpl) info).getORB().string_to_object( br.readLine() ); 50 51 br.close(); 52 53 info.add_client_request_interceptor( new ClientInterceptorB( obj ) ); 54 } 55 catch( Exception e ) 56 { 57 e.printStackTrace(); 58 } 59 } 60 } 62 | Popular Tags |