KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.PortableInterceptor;
2
3
4 /**
5 * org/omg/PortableInterceptor/ServerRequestInfoOperations.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 server-side request interceptors.
14    * <p>
15    * Some attributes and operations on <code>ServerRequestInfo</code> are not
16    * valid at all interception points. The following table shows the validity
17    * of each attribute or operation. If it is not valid, attempting to access
18    * it will result in a <code>BAD_INV_ORDER</code> being thrown with a
19    * standard minor code of 14.
20    * <p>
21    *
22    *
23    * <table border=1 summary="Shows the validity of each attribute or operation">
24    * <thead>
25    * <tr>
26    * <th>&nbsp;</th>
27    * <th id="rec_req_ser_con" valign="bottom">receive_request_<br>service_contexts</th>
28    * <th id="rec_req" valign="bottom">receive_request</th>
29    * <th id="send_rep" valign="bottom">send_reply</th>
30    * <th id="send_exc" valign="bottom">send_exception</th>
31    * <th id="send_oth" valign="bottom">send_other</th>
32    * </tr>
33    * </thead>
34    * <tbody>
35    *
36    *
37    * <tr>
38    * <td id="ri" colspan=6><i>Inherited from RequestInfo:</i></td>
39    * </tr>
40    *
41    * <tr><th id="req_id"><p align="left">request_id</p></th>
42    * <td headers="ri req_id rec_req_ser_con">yes</td>
43    * <td headers="ri req_id rec_req">yes</td>
44    * <td headers="ri req_id send_rep">yes</td>
45    * <td headers="ri req_id send_exc">yes</td>
46    * <td headers="ri req_id send_oth">yes</td></tr>
47    *
48    * <tr><th id="op"><p align="left">operation</p></th>
49    * <td headers="ri op rec_req_ser_con">yes</td>
50    * <td headers="ri op rec_req">yes</td>
51    * <td headers="ri op send_rep">yes</td>
52    * <td headers="ri op send_exc">yes</td>
53    * <td headers="ri op send_oth">yes</td></tr>
54    *
55    * <tr><th id="args"><p align="left">arguments</p></th>
56    * <td headers="ri args rec_req_ser_con">no </td>
57    * <td headers="ri args rec_req">yes<sub>1</sub></td>
58    * <td headers="ri args send_rep">yes</td>
59    * <td headers="ri args send_exc">no<sub>2</sub></td>
60    * <td headers="ri args send_oth">no<sub>2</sub>
61    * </td></tr>
62    *
63    * <tr><th id="exps"><p align="left">exceptions</p></th>
64    * <td headers="ri exps rec_req_ser_con">no </td>
65    * <td headers="ri exps rec_req">yes</td>
66    * <td headers="ri exps send_rep">yes</td>
67    * <td headers="ri exps send_exc">yes</td>
68    * <td headers="ri exps send_oth">yes</td></tr>
69    *
70    * <tr><th id="contexts"><p align="left">contexts</p></th>
71    * <td headers="ri contexts rec_req_ser_con">no </td>
72    * <td headers="ri contexts rec_req">yes</td>
73    * <td headers="ri contexts send_rep">yes</td>
74    * <td headers="ri contexts send_exc">yes</td>
75    * <td headers="ri contexts send_oth">yes</td></tr>
76    *
77    * <tr><th id="op_con"><p align="left">operation_context</p></th>
78    * <td headers="ri op_con rec_req_ser_con">no </td>
79    * <td headers="ri op_con rec_req">yes</td>
80    * <td headers="ri op_con send_rep">yes</td>
81    * <td headers="ri op_con send_exc">no </td>
82    * <td headers="ri op_con send_oth">no </td>
83    * </tr>
84    *
85    * <tr><th id="result"><p align="left">result</p></th>
86    * <td headers="ri result rec_req_ser_con">no </td>
87    * <td headers="ri result rec_req">no </td>
88    * <td headers="ri result send_rep">yes</td>
89    * <td headers="ri result send_exc">no </td>
90    * <td headers="ri result send_oth">no </td>
91    * </tr>
92    *
93    * <tr><th id="res_ex"><p align="left">response_expected</p></th>
94    * <td headers="ri res_ex rec_req_ser_con">yes</td>
95    * <td headers="ri res_ex rec_req">yes</td>
96    * <td headers="ri res_ex send_rep">yes</td>
97    * <td headers="ri res_ex send_exc">yes</td>
98    * <td headers="ri res_ex send_oth">yes</td></tr>
99    *
100    * <tr><th id="syn_scp"><p align="left">sync_scope</p></th>
101    * <td headers="ri syn_scp rec_req_ser_con">yes</td>
102    * <td headers="ri syn_scp rec_req">yes</td>
103    * <td headers="ri syn_scp send_rep">yes</td>
104    * <td headers="ri syn_scp send_exc">yes</td>
105    * <td headers="ri syn_scp send_oth">yes</td></tr>
106    *
107    * <tr><td><b>request_id</b></td>
108    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
109    *
110    * <tr><td><b>operation</b></td>
111    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
112    *
113    * <tr><td><b>arguments</b></td>
114    * <td>no </td> <td>yes<sub>1</sub</td>
115    * <td>yes</td> <td>no<sub>2</sub></td>
116    * <td>no<sub>2</sub>
117    * </td></tr>
118    *
119    * <tr><td><b>exceptions</b></td>
120    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
121    *
122    * <tr><td><b>contexts</b></td>
123    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
124    *
125    * <tr><td><b>operation_context</b></td>
126    * <td>no </td> <td>yes</td> <td>yes</td> <td>no </td> <td>no </td></tr>
127    *
128    * <tr><td><b>result</b></td>
129    * <td>no </td> <td>no </td> <td>yes</td> <td>no </td> <td>no </td></tr>
130    *
131    * <tr><td><b>response_expected</b></td>
132    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
133    *
134    * <tr><td><b>sync_scope</b></td>
135    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
136    *
137    * <tr><td><b>reply_status</b></td>
138    * <td>no </td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
139    *
140    * <tr><td><b>forward_reference</b></td>
141    * <td>no </td> <td>no </td> <td>no </td> <td>no </td> <td>yes<sub>2</sub>
142    * </td></tr>
143    *
144    * <tr><td><b>get_slot</b></td>
145    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
146    *
147    * <tr><td><b>get_request_service_context</b></td>
148    * <td>yes</td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
149    *
150    * <tr><td><b>get_reply_service_context</b></td>
151    * <td>no </td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
152    *
153    * <tr>
154    * <td colspan=6><i>ServerRequestInfo-specific:</i></td>
155    * </tr>
156    *
157    * <tr><td><b>sending_exception</b></td>
158    * <td>no </td> <td>no </td> <td>no </td> <td>yes</td> <td>no </td></tr>
159    *
160    * <tr><td><b>object_id</b></td>
161    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes<sub>3</sub></td>
162    * <td>yes<sub>3</sub>
163    * </td></tr>
164    *
165    * <tr><td><b>adapter_id</b></td>
166    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes<sub>3</sub></td>
167    * <td>yes<sub>3</sub>
168    * </td></tr>
169    *
170    * <tr><td><b>server_id</b></td>
171    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
172    *
173    * <tr><td><b>orb_id</b></td>
174    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
175    *
176    * <tr><td><b>adapter_name</b></td>
177    * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
178    *
179    * <tr><td><b>target_most_derived_interface</b></td>
180    * <td>no </td> <td>yes</td> <td>no<sub>4</sub></td>
181    * <td>no<sub>4</sub></td>
182    * <td>no<sub>4</sub>
183    * </td></tr>
184    *
185    * <tr><td><b>get_server_policy</b></td>
186    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
187    *
188    * <tr><td><b>set_slot</b></td>
189    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
190    *
191    * <tr><td><b>target_is_a</b></td>
192    * <td>no </td> <td>yes</td> <td>no<sub>4</sub></td>
193    * <td>no<sub>4</sub></td>
194    * <td>no<sub>4</sub>
195    * </td></tr>
196    *
197    * <tr><td><b>add_reply_service_context</b></td>
198    * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
199    * </tbody>
200    * </table>
201    *
202    * <ol>
203    * <li>When <code>ServerRequestInfo</code> is passed to
204    * <code>receive_request</code>, there is an entry in the list for
205    * every argument, whether in, inout, or out. But only the in and
206    * inout arguments will be available.</li>
207    * <li>If the <code>reply_status</code> attribute is not
208    * <code>LOCATION_FORWARD</code>, accessing this attribute will throw
209    * <code>BAD_INV_ORDER</code> with a standard minor code of 14.</li>
210    * <li>If the servant locator caused a location forward, or thrown an
211    * exception, this attribute/operation may not be available in this
212    * interception point. <code>NO_RESOURCES</code> with a standard minor
213    * code of 1 will be thrown if it is not available.</li>
214    * <li>The operation is not available in this interception point because
215    * the necessary information requires access to the target object's
216    * servant, which may no longer be available to the ORB. For example,
217    * if the object's adapter is a POA that uses a
218    * <code>ServantLocator</code>, then the ORB invokes the interception
219    * point after it calls <code>ServantLocator.postinvoke()</code></li>.
220    * </ol>
221    *
222    * @see ServerRequestInterceptor
223    */

224 public interface ServerRequestInfoOperations extends org.omg.PortableInterceptor.RequestInfoOperations JavaDoc
225 {
226
227   /**
228      * Returns an any which contains the exception to be returned to
229      * the client.
230      * <p>
231      * If the exception is a user exception which cannot be inserted into
232      * an any (e.g., it is unknown or the bindings don't provide the
233      * <code>TypeCode</code>), then this attribute will be an any
234      * containing the system exception <code>UNKNOWN</code> with a
235      * standard minor code of 1.
236      *
237      * @see <a HREF="package-summary.html#unimpl">
238      * <code>PortableInterceptor</code> package comments for
239      * limitations / unimplemented features</a>
240      */

241   org.omg.CORBA.Any JavaDoc sending_exception ();
242
243   /**
244      * Returns the opaque <code>object_id</code> describing the target of
245      * the operation invocation.
246      */

247   byte[] object_id ();
248
249   /**
250      * Returns the opaque identifier for the object adapter.
251      */

252   byte[] adapter_id ();
253
254   /**
255      * Returns the server ID that was specified on ORB::init using the -ORBServerId
256      * argument.
257      */

258   String JavaDoc server_id ();
259
260   /**
261      * Returns the ID that was used to create the ORB.
262      */

263   String JavaDoc orb_id ();
264
265   /**
266      * Returns the sequence of strings that identifies the object
267      * adapter instance that is handling this request.
268      */

269   String JavaDoc[] adapter_name ();
270
271   /**
272      * Returns the repository id for the most derived interface of the
273      * servant.
274      */

275   String JavaDoc target_most_derived_interface ();
276
277   /**
278      * Returns the policy in effect for this operation for the given
279      * policy type. The returned <code>CORBA.Policy</code> object shall
280      * only be a policy whose type was registered via
281      * <code>register_policy_factory</code>.
282      *
283      * @param type The <code>CORBA.PolicyType</code> which specifies the
284      * policy to be returned.
285      * @return The <code>CORBA.Policy</code> obtained with the given
286      * policy type.
287      * @exception INV_POLICY thrown, with a standard minor code of 2, if
288      * a policy for the given type was not registered via
289      * <code>register_policy_factory</code>.
290      * @see ORBInitInfo#register_policy_factory
291      */

292   org.omg.CORBA.Policy JavaDoc get_server_policy (int type);
293
294   /**
295      * Allows an Interceptor to set a slot in the
296      * <code>PortableInterceptor.Current</code> that is in the scope of
297      * the request. If data already exists in that slot, it will be
298      * overwritten.
299      *
300      * @param id The id of the slot.
301      * @param data The data, in the form of an any, to store in that slot.
302      * @exception InvalidSlot thrown if the ID does not define an allocated
303      * slot.
304      * @see Current
305      */

306   void set_slot (int id, org.omg.CORBA.Any JavaDoc data) throws org.omg.PortableInterceptor.InvalidSlot JavaDoc;
307
308   /**
309      * Returns true if the servant is the given repository id,
310      * false if it is not.
311      *
312      * @param id The caller wants to know if the servant is this
313      * repository id.
314      * @return Is the servant the given RepositoryId?
315      */

316   boolean target_is_a (String JavaDoc id);
317
318   /**
319      * Allows Interceptors to add service contexts to the request.
320      * <p>
321      * There is no declaration of the order of the service contexts.
322      * They may or may not appear in the order that they are added.
323      *
324      * @param service_context The <code>IOP.ServiceContext</code> to add to
325      * the reply.
326      * @param replace Indicates the behavior of this operation when a
327      * service context already exists with the given ID. If false,
328      * then <code>BAD_INV_ORDER</code> with a standard minor code of 15
329      * is thrown. If true, then the existing service context is
330      * replaced by the new one.
331      * @exception BAD_INV_ORDER thrown, with a standard minor code of 15, if
332      * replace is false and a service context already exists with the
333      * given ID.
334      */

335   void add_reply_service_context (org.omg.IOP.ServiceContext JavaDoc service_context, boolean replace);
336 } // interface ServerRequestInfoOperations
337
Popular Tags