KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.PortableInterceptor;
2
3
4 /**
5 * org/omg/PortableInterceptor/RequestInfoOperations.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    * Request Information, accessible to Interceptors.
14    * <p>
15    * Each interception point is given an object through which the
16    * Interceptor can access request information. Client-side and server-side
17    * interception points are concerned with different information, so there
18    * are two information objects: <code>ClientRequestInfo</code> is passed
19    * to the client-side interception points and <code>ServerRequestInfo</code>
20    * is passed to the server-side interception points. But there is
21    * information that is common to both, so they both inherit from a common
22    * interface: <code>RequestInfo</code>.
23    *
24    * @see ClientRequestInfo
25    * @see ServerRequestInfo
26    */

27 public interface RequestInfoOperations
28 {
29
30   /**
31      * Returns an id that uniquely identifies an active request/reply
32      * sequence. Once a request/reply sequence is concluded this ID may be
33      * reused. Note that this id is not the same as the GIOP
34      * <code>request_id</code>. If GIOP is the transport mechanism used,
35      * then these IDs may very well be the same, but this is not guaranteed
36      * nor required.
37      */

38   int request_id ();
39
40   /**
41      * Returns the name of the operation being invoked.
42      */

43   String JavaDoc operation ();
44
45   /**
46      * Returns an array of <code>Parameter</code> objects, containing the
47      * arguments on the operation being invoked. If there are no arguments,
48      * this attribute will be a zero length array.
49      * <p>
50      * Not all environments provide access to the arguments. With the Java
51      * portable bindings, for example, the arguments are not available.
52      * In these environments, when this attribute is accessed,
53      * <code>NO_RESOURCES</code> will be thrown with a standard minor code
54      * of 1.
55      * <p>
56      * <i>Note: Arguments are available for DSI/DII calls.</i>
57      *
58      * @exception NO_RESOURCES thrown if arguments are not available.
59      * @see <a HREF="package-summary.html#unimpl">
60      * <code>PortableInterceptor</code> package comments for
61      * limitations / unimplemented features</a>
62      */

63   org.omg.Dynamic.Parameter JavaDoc[] arguments ();
64
65   /**
66      * Returns an array of <code>TypeCode</code> objects describing the
67      * <code>TypeCode</code>s of the user exceptions that this operation
68      * invocation may throw. If there are no user exceptions, this
69      * will return a zero length array.
70      * <p>
71      * Not all environments provide access to the exception list. With
72      * the Java portable bindings, for example, the exception list is
73      * not available. In these environments, when this attribute is
74      * accessed, <code>NO_RESOURCES</code> will be thrown with a
75      * standard minor code of 1.
76      * <p>
77      * <i>Note: Exceptions are available for DSI/DII calls.</i>
78      *
79      * @exception NO_RESOURCES thrown if exceptions are not available.
80      * @see <a HREF="package-summary.html#unimpl">
81      * <code>PortableInterceptor</code> package comments for
82      * limitations / unimplemented features</a>
83      */

84   org.omg.CORBA.TypeCode JavaDoc[] exceptions ();
85
86   /**
87      * Returns an array of <code>String</code> objects describing the
88      * contexts that may be passed on this operation invocation. If there
89      * are no contexts, this will return a zero length array.
90      * <p>
91      * Not all environments provide access to the context list. With the
92      * Java portable bindings, for example, the context list is not
93      * available. In these environments, when this attribute is accessed,
94      * <code>NO_RESOURCES</code> will be thrown with a standard minor code
95      * of 1.
96      * <p>
97      * <i>Note: Contexts are available for DSI/DII calls.</i>
98      *
99      * @exception NO_RESOURCES thrown if contexts are not available.
100      * @see <a HREF="package-summary.html#unimpl">
101      * <code>PortableInterceptor</code> package comments for
102      * limitations / unimplemented features</a>
103      */

104   String JavaDoc[] contexts ();
105
106   /**
107      * Returns an array of <code>String</code> objects containing the
108      * contexts being sent on the request.
109      * <p>
110      * Not all environments provide access to the context. With the Java
111      * portable bindings, for example, the context is not available. In
112      * these environments, when this attribute is accessed, NO_RESOURCES will
113      * be thrown with standard minor code of 1.
114      * <p>
115      * <i>Note: <code>operation_context</code> is available for
116      * DSI/DII calls.</i>
117      *
118      * @exception NO_RESOURCES thrown if operation context is not available.
119      * @see <a HREF="package-summary.html#unimpl">
120      * <code>PortableInterceptor</code> package comments for
121      * limitations / unimplemented features</a>
122      */

123   String JavaDoc[] operation_context ();
124
125   /**
126      * Returns an any containing the result of the operation invocation.
127      * If the operation return type is void, this attribute will be an any
128      * containing a type code with a <code>TCKind</code> value of
129      * <code>tk_void</code> and no value.
130      * <p>
131      * Not all environments provide access to the result. With the Java
132      * portable bindings, for example, the result is not available. In
133      * these environments, when this attribute is accessed,
134      * <code>NO_RESOURCES</code> will be thrown with a standard minor code of
135      * 1.
136      * <p>
137      * <i>Note: Result is available for DSI/DII calls.</i>
138      *
139      * @exception NO_RESOURCES thrown if result is not available.
140      * @see <a HREF="package-summary.html#unimpl">
141      * <code>PortableInterceptor</code> package comments for
142      * limitations / unimplemented features</a>
143      */

144   org.omg.CORBA.Any JavaDoc result ();
145
146   /**
147      * Indicates whether a response is expected.
148      * <p>
149      * On the client, a reply is not returned when
150      * <code>response_expected</code> is false, so <code>receive_reply</code>
151      * cannot be called. <code>receive_other</code> is called unless an
152      * exception occurs, in which case <code>receive_exception</code> is
153      * called.
154      * <p>
155      * On the client, within <code>send_poll</code>, this attribute is true.
156      */

157   boolean response_expected ();
158
159   /**
160      * Defines how far the request shall progress before control is returned
161      * to the client. This is defined in the Messaging specification, and
162      * is pertinent only when <code>response_expected</code> is false. If
163      * <code>response_expected</code> is true, the value of
164      * <code>sync_scope</code> is undefined. This attribute may have one of
165      * the following values:
166      * <ul>
167      * <li><code>Messaging.SYNC_NONE</code></li>
168      * <li><code>Messaging.SYNC_WITH_TRANSPORT</code></li>
169      * <li><code>Messaging.SYNC_WITH_SERVER</code></li>
170      * <li><code>Messaging.SYNC_WITH_TARGET</code></li>
171      * </ul>
172      * On the server, for all scopes, a reply will be created from the
173      * return of the target operation call, but the reply will not return
174      * to the client. Although it does not return to the client, it does
175      * occur, so the normal server-side interception points are
176      * followed (i.e., <code>receive_request_service_contexts</code>,
177      * <code>receive_request</code>, <code>send_reply</code> or
178      * <code>send_exception</code>).
179      * <p>
180      * For <code>SYNC_WITH_SERVER</code> and <code>SYNC_WITH_TARGET</code>,
181      * the server does send an empty reply back to the client before the
182      * target is invoked. This reply is not intercepted by server-side
183      * Interceptors.
184      *
185      * @see <a HREF="package-summary.html#unimpl">
186      * <code>PortableInterceptor</code> package comments for
187      * limitations / unimplemented features</a>
188      */

189   short sync_scope ();
190
191   /**
192      * Describes the state of the result of the operation invocation. The
193      * return value can be one of the following:
194      * <ul>
195      * <li><code>PortableInterceptor.SUCCESSFUL</code></li>
196      * <li><code>PortableInterceptor.SYSTEM_EXCEPTION</code></li>
197      * <li><code>PortableInterceptor.USER_EXCEPTION</code></li>
198      * <li><code>PortableInterceptor.LOCATION_FORWARD</code></li>
199      * <li><code>PortableInterceptor.TRANSPORT_RETRY</code></li>
200      * </ul>
201      * On the client:
202      * <ul>
203      * <li>Within the <code>receive_reply</code> interception point, this
204      * will only return <code>SUCCESSFUL</code></li>.
205      * <li>Within the <code>receive_exception</code> interception point,
206      * this will be either <code>SYSTEM_EXCEPTION</code> or
207      * <code>USER_EXCEPTION</code>.</li>
208      * <li>Within the <code>receive_other</code> interception point, this
209      * will be any of: <code>SUCCESSFUL</code>,
210      * <code>LOCATION_FORWARD</code>, or <code>TRANSPORT_RETRY</code>.
211      * <code>SUCCESSFUL</code> means an asynchronous request returned
212      * successfully. <code>LOCATION_FORWARD</code> means that a reply
213      * came back with <code>LOCATION_FORWARD</code> as its status.
214      * <code>TRANSPORT_RETRY</code> means that the transport
215      * mechanism indicated a retry - a GIOP reply with a status of
216      * <code>NEEDS_ADDRESSING_MODE</code>, for instance. </li>
217      * </ul>
218      * On the server:
219      * <ul>
220      * <li>Within the <code>send_reply</code> interception point, this
221      * will only be <code>SUCCESSFUL</code>.</li>
222      * <li>Within the <code>send_exception</code> interception point,
223      * this will be either <code>SYSTEM_EXCEPTION</code> or
224      * <code>USER_EXCEPTION</code>.</li>
225      * <li>Within the <code>send_other</code> interception point, this
226      * attribute will be any of: <code>SUCCESSFUL</code>, or
227      * <code>LOCATION_FORWARD</code>. <code>SUCCESSFUL</code> means
228      * an asynchronous request returned successfully.
229      * <code>LOCATION_FORWARD</code> means that a reply came back
230      * with <code>LOCATION_FORWARD</code> as its status.</li>
231      * </ul>
232      *
233      * @see SUCCESSFUL
234      * @see SYSTEM_EXCEPTION
235      * @see USER_EXCEPTION
236      * @see LOCATION_FORWARD
237      * @see TRANSPORT_RETRY
238      */

239   short reply_status ();
240
241   /**
242      * Contains the object to which the request will be forwarded, if the
243      * <code>reply_status</code> attribute is <code>LOCATION_FORWARD</code>.
244      * It is indeterminate whether a forwarded request will actually occur.
245      */

246   org.omg.CORBA.Object JavaDoc forward_reference ();
247
248   /**
249      * Returns the data from the given slot of the
250      * <code>PortableInterceptor.Current</code> that is in the scope of
251      * the request.
252      * <p>
253      * If the given slot has not been set, then an any containing a
254      * type code with a <code>TCKind</code> value of <code>tk_null</code> is
255      * returned.
256      *
257      * @param id The <code>SlotId</code> of the slot which is to be
258      * returned.
259      * @return The slot data, in the form of an any, obtained with the
260      * given identifier.
261      * @exception InvalidSlot thrown if the ID does not define an
262      * allocated slot.
263      * @see Current
264      */

265   org.omg.CORBA.Any JavaDoc get_slot (int id) throws org.omg.PortableInterceptor.InvalidSlot JavaDoc;
266
267   /**
268      * Returns a copy of the service context with the given ID that
269      * is associated with the request.
270      * <p>
271      * @param id The <code>IOP.ServiceId</code> of the service context
272      * which is to be returned.
273      * @return The <code>IOP.ServiceContext</code> obtained with the
274      * given identifier.
275      * @exception BAD_PARAM thrown with a standard minor code of 26, if the
276      * request's service context does not contain an entry for that ID.
277      */

278   org.omg.IOP.ServiceContext JavaDoc get_request_service_context (int id);
279
280   /**
281      * Returns a copy of the service context with the given ID that
282      * is associated with the reply.
283      *
284      * @param id The <code>IOP.ServiceId</code> of the service context
285      * which is to be returned.
286      * @return The <code>IOP.ServiceContext</code> obtained with the given
287      * identifier.
288      * @exception BAD_PARAM thrown with a standard minor code of 26 if the
289      * request's service context does not contain an entry for that ID.
290      */

291   org.omg.IOP.ServiceContext JavaDoc get_reply_service_context (int id);
292 } // interface RequestInfoOperations
293
Popular Tags