KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > interceptor > client_flow > ClientInterceptorA


1 package test.interceptor.client_flow;
2
3 import org.omg.PortableInterceptor.*;
4
5 /**
6  * ClientInterceptor.java
7  *
8  *
9  * Created: Fri Oct 26 11:04:19 2001
10  *
11  * @author Nicolas Noffke
12  * @version $Id: ClientInterceptorA.java,v 1.1 2001/12/21 10:54:47 nicolas Exp $
13  */

14
15 public class ClientInterceptorA
16     extends org.jacorb.orb.LocalityConstrainedObject
17     implements ClientRequestInterceptor
18 {
19     public ClientInterceptorA()
20     {
21     }
22
23     public String JavaDoc name()
24     {
25         return "A";
26     }
27
28     public void destroy()
29     {
30     }
31
32     public void send_request( ClientRequestInfo ri )
33         throws ForwardRequest
34     {
35         System.out.println("ClientInterceptor A: send_request");
36     }
37
38     public void send_poll(ClientRequestInfo ri)
39     {
40     }
41
42     public void receive_reply(ClientRequestInfo ri)
43     {
44     }
45
46     public void receive_exception(ClientRequestInfo ri)
47         throws ForwardRequest
48     {
49     }
50
51     public void receive_other(ClientRequestInfo ri)
52         throws ForwardRequest
53     {
54         System.out.println("ClientInterceptor A: receive_other");
55         
56         try
57         {
58             System.out.println( ri.forward_reference() );
59         }
60         catch( Exception JavaDoc e )
61         {
62             e.printStackTrace();
63         }
64     }
65 }// ClientInterceptor
66
Popular Tags