1 26 27 package org.objectweb.corba.trace.PI; 28 29 30 36 37 public class Initializer extends org.omg.CORBA.LocalObject 38 implements org.omg.PortableInterceptor.ORBInitializer { 39 42 private int trace_slot; 43 44 private TraceCI clientInterceptor; 45 private TraceSI serverInterceptor; 46 47 50 public void pre_init(org.omg.PortableInterceptor.ORBInitInfo info) { 51 } 52 53 56 public void post_init(org.omg.PortableInterceptor.ORBInitInfo info) { 57 trace_slot = info.allocate_slot_id(); 59 60 clientInterceptor = new TraceCI(trace_slot, info); 61 serverInterceptor = new TraceSI(trace_slot, info); 62 63 try { 64 info.add_client_request_interceptor(clientInterceptor); 65 info.add_server_request_interceptor(serverInterceptor); 66 } catch (org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName dn) { 67 System.out.println("Initializer, Duplicate name when adding the interceptor"); 68 } 69 } 70 } | Popular Tags |