KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > PortableInterceptor > ServerRequestInterceptorOperations


1 package org.omg.PortableInterceptor;
2
3
4 /**
5 * org/omg/PortableInterceptor/ServerRequestInterceptorOperations.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
8 * Saturday, February 9, 2008 9:40:08 AM GMT
9 */

10
11
12 /**
13    * Server-side request interceptor.
14    * <p>
15    * A request Interceptor is designed to intercept the flow of a
16    * request/reply sequence through the ORB at specific points so that
17    * services can query the request information and manipulate the service
18    * contexts which are propagated between clients and servers. The primary
19    * use of request Interceptors is to enable ORB services to transfer
20    * context information between clients and servers. There are two types
21    * of request Interceptors: client-side and server-side.
22    * <p>
23    * To write a server-side Interceptor, implement the
24    * ServerRequestInterceptor interface.
25    *
26    * @see ServerRequestInfo
27    */

28 public interface ServerRequestInterceptorOperations extends org.omg.PortableInterceptor.InterceptorOperations JavaDoc
29 {
30
31   /**
32      * Allows the interceptor to process service context information.
33      * <p>
34      * At this interception point, Interceptors must get their service
35      * context information from the incoming request transfer it to
36      * <code>PortableInterceptor.Current</code>'s slots.
37      * <p>
38      * This interception point is called before the servant manager is called.
39      * Operation parameters are not yet available at this point. This
40      * interception point may or may not execute in the same thread as
41      * the target invocation.
42      * <p>
43      * This interception point may throw a system exception. If it does,
44      * no other Interceptors' <code>receive_request_service_contexts</code>
45      * operations are called. Those Interceptors on the Flow Stack are
46      * popped and their <code>send_exception</code> interception points are
47      * called.
48      * <p>
49      * This interception point may also throw a <code>ForwardRequest</code>
50      * exception. If an Interceptor throws this exception, no other
51      * Interceptors' <code>receive_request_service_contexts</code> operations
52      * are called. Those Interceptors on the Flow Stack are popped and
53      * their <code>send_other</code> interception points are called.
54      * <p>
55      * Compliant Interceptors shall properly follow
56      * <code>completion_status</code> semantics if they throw a system
57      * exception from this interception point. The
58      * <code>completion_status</code> shall be COMPLETED_NO.
59      *
60      * @param ri Information about the current request being intercepted.
61      * @exception ForwardRequest If thrown, indicates to the ORB that a
62      * retry of the request should occur with the new object given in
63      * the exception.
64      */

65   void receive_request_service_contexts (org.omg.PortableInterceptor.ServerRequestInfo JavaDoc ri) throws org.omg.PortableInterceptor.ForwardRequest JavaDoc;
66
67   /**
68      * Allows an Interceptor to query request information after all the
69      * information, including operation parameters, are available. This
70      * interception point shall execute in the same thread as the target
71      * invocation.
72      * <p>
73      * In the DSI model, since the parameters are first available when
74      * the user code calls <code>arguments</code>, <code>receive_request</code>
75      * is called from within <code>arguments</code>. It is possible that
76      * <code>arguments</code> is not called in the DSI model. The target
77      * may call <code>set_exception</code> before calling
78      * <code>arguments</code>. The ORB shall guarantee that
79      * <code>receive_request</code> is called once, either through
80      * <code>arguments</code> or through <code>set_exception</code>. If it
81      * is called through <code>set_exception</code>, requesting the
82      * arguments will result in <code>NO_RESOURCES</code> being thrown with
83      * a standard minor code of 1.
84      * <p>
85      * This interception point may throw a system exception. If it does, no
86      * other Interceptors' <code>receive_request</code> operations are
87      * called. Those Interceptors on the Flow Stack are popped and their
88      * <code>send_exception</code> interception points are called.
89      * <p>
90      * This interception point may also throw a <code>ForwardRequest</code>
91      * exception. If an Interceptor throws this exception, no other
92      * Interceptors' <code>receive_request</code> operations are called.
93      * Those Interceptors on the Flow Stack are popped and their
94      * <code>send_other</code> interception points are called.
95      * <p>
96      * Compliant Interceptors shall properly follow
97      * <code>completion_status</code> semantics if they throw a system
98      * exception from this interception point. The
99      * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
100      *
101      * @param ri Information about the current request being intercepted.
102      * @exception ForwardRequest If thrown, indicates to the ORB that a
103      * retry of the request should occur with the new object given in
104      * the exception.
105      */

106   void receive_request (org.omg.PortableInterceptor.ServerRequestInfo JavaDoc ri) throws org.omg.PortableInterceptor.ForwardRequest JavaDoc;
107
108   /**
109      * Allows an Interceptor to query reply information and modify the
110      * reply service context after the target operation has been invoked
111      * and before the reply is returned to the client. This interception
112      * point shall execute in the same thread as the target invocation.
113      * <p>
114      * This interception point may throw a system exception. If it does,
115      * no other Interceptors' <code>send_reply</code> operations are called.
116      * The remaining Interceptors in the Flow Stack shall have their
117      * <code>send_exception</code> interception point called.
118      * <p>
119      * Compliant Interceptors shall properly follow
120      * <code>completion_status</code> semantics if they throw a
121      * system exception from this interception point. The
122      * <code>completion_status</code> shall be <code>COMPLETED_YES</code>.
123      *
124      * @param ri Information about the current request being intercepted.
125      */

126   void send_reply (org.omg.PortableInterceptor.ServerRequestInfo JavaDoc ri);
127
128   /**
129      * Allows an Interceptor to query the exception information and modify
130      * the reply service context before the exception is thrown to the client.
131      * When an exception occurs, this interception point is called. This
132      * interception point shall execute in the same thread as the target
133      * invocation.
134      * <p>
135      * This interception point may throw a system exception. This has the
136      * effect of changing the exception which successive Interceptors
137      * popped from the Flow Stack receive on their calls to
138      * <code>send_exception</code>. The exception thrown to the client will
139      * be the last exception thrown by an Interceptor, or the original
140      * exception if no Interceptor changes the exception.
141      * <p>
142      * This interception point may also throw a <code>ForwardRequest</code>
143      * exception. If an Interceptor throws this exception, no other
144      * Interceptors' <code>send_exception</code> operations are called. The
145      * remaining Interceptors in the Flow Stack shall have their
146      * <code>send_other</code> interception points called.
147      * <p>
148      * If the <code>completion_status</code> of the exception is not
149      * <code>COMPLETED_NO</code>, then it is inappropriate for this
150      * interception point to throw a <code>ForwardRequest</code> exception.
151      * The request's at-most-once semantics would be lost.
152      * <p>
153      * Compliant Interceptors shall properly follow
154      * <code>completion_status</code> semantics if they throw a system
155      * exception from this interception point. If the original exception
156      * is a system exception, the <code>completion_status</code> of the new
157      * exception shall be the same as on the original. If the original
158      * exception is a user exception, then the <code>completion_status</code>
159      * of the new exception shall be <code>COMPLETED_YES</code>.
160      *
161      * @param ri Information about the current request being intercepted.
162      * @exception ForwardRequest If thrown, indicates to the ORB that a
163      * retry of the request should occur with the new object given in
164      * the exception.
165      */

166   void send_exception (org.omg.PortableInterceptor.ServerRequestInfo JavaDoc ri) throws org.omg.PortableInterceptor.ForwardRequest JavaDoc;
167
168   /**
169      * Allows an Interceptor to query the information available when a
170      * request results in something other than a normal reply or an
171      * exception. For example, a request could result in a retry
172      * (e.g., a GIOP Reply with a <code>LOCATION_FORWARD</code> status was
173      * received). This interception point shall execute in the same thread
174      * as the target invocation.
175      * <p>
176      * This interception point may throw a system exception. If it does,
177      * no other Interceptors' <code>send_other</code> operations are called.
178      * The remaining Interceptors in the Flow Stack shall have their
179      * <code>send_exception</code> interception points called.
180      * <p>
181      * This interception point may also throw a <code>ForwardRequest</code>
182      * exception. If an Interceptor throws this exception, successive
183      * Interceptors' <code>send_other</code> operations are called with
184      * the new information provided by the <code>ForwardRequest</code>
185      * exception.
186      * <p>
187      * Compliant Interceptors shall properly follow
188      * <code>completion_status</code> semantics if they throw a system
189      * exception from this interception point. The
190      * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
191      *
192      * @param ri Information about the current request being intercepted.
193      * @exception ForwardRequest If thrown, indicates to the ORB that a
194      * retry of the request should occur with the new object given in
195      * the exception.
196      */

197   void send_other (org.omg.PortableInterceptor.ServerRequestInfo JavaDoc ri) throws org.omg.PortableInterceptor.ForwardRequest JavaDoc;
198 } // interface ServerRequestInterceptorOperations
199
Popular Tags