1 package test.interceptor.client_flow; 2 3 import org.omg.PortableInterceptor.*; 4 5 14 15 public class ClientInterceptorB 16 extends org.jacorb.orb.LocalityConstrainedObject 17 implements ClientRequestInterceptor 18 { 19 private org.omg.CORBA.Object forward = null; 20 private boolean triggered = false; 21 22 public ClientInterceptorB( org.omg.CORBA.Object forward ) 23 { 24 this.forward = forward; 25 } 26 27 public String name() 28 { 29 return "B"; 30 } 31 32 public void destroy() 33 { 34 } 35 36 public void send_request( ClientRequestInfo ri ) 37 throws ForwardRequest 38 { 39 System.out.println("ClientInterceptor B: send_request"); 40 41 if( ! triggered ) 42 { 43 triggered = true; 44 45 System.out.println("ClientInterceptor B: throwing ForwardRequest"); 46 47 throw new ForwardRequest( forward, 48 false ); 49 } 50 } 51 52 public void send_poll(ClientRequestInfo ri) 53 { 54 } 55 56 public void receive_reply(ClientRequestInfo ri) 57 { 58 } 59 60 public void receive_exception(ClientRequestInfo ri) 61 throws ForwardRequest 62 { 63 } 64 65 public void receive_other(ClientRequestInfo ri) 66 throws ForwardRequest 67 { 68 System.out.println("ClientInterceptor B: receive_other"); 69 } 70 } | Popular Tags |