1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/ServerRequestInfoOperations.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
  6. * Wednesday, September 15, 2004 10:28:46 AM GMT
  7. */
  8. /**
  9. * Request Information, accessible to server-side request interceptors.
  10. * <p>
  11. * Some attributes and operations on <code>ServerRequestInfo</code> are not
  12. * valid at all interception points. The following table shows the validity
  13. * of each attribute or operation. If it is not valid, attempting to access
  14. * it will result in a <code>BAD_INV_ORDER</code> being thrown with a
  15. * standard minor code of 14.
  16. * <p>
  17. *
  18. *
  19. * <table border=1 summary="Shows the validity of each attribute or operation">
  20. * <thead>
  21. * <tr>
  22. * <th> </th>
  23. * <th id="rec_req_ser_con" valign="bottom">receive_request_<br>service_contexts</th>
  24. * <th id="rec_req" valign="bottom">receive_request</th>
  25. * <th id="send_rep" valign="bottom">send_reply</th>
  26. * <th id="send_exc" valign="bottom">send_exception</th>
  27. * <th id="send_oth" valign="bottom">send_other</th>
  28. * </tr>
  29. * </thead>
  30. * <tbody>
  31. *
  32. *
  33. * <tr>
  34. * <td id="ri" colspan=6><i>Inherited from RequestInfo:</i></td>
  35. * </tr>
  36. *
  37. * <tr><th id="req_id"><p align="left">request_id</p></th>
  38. * <td headers="ri req_id rec_req_ser_con">yes</td>
  39. * <td headers="ri req_id rec_req">yes</td>
  40. * <td headers="ri req_id send_rep">yes</td>
  41. * <td headers="ri req_id send_exc">yes</td>
  42. * <td headers="ri req_id send_oth">yes</td></tr>
  43. *
  44. * <tr><th id="op"><p align="left">operation</p></th>
  45. * <td headers="ri op rec_req_ser_con">yes</td>
  46. * <td headers="ri op rec_req">yes</td>
  47. * <td headers="ri op send_rep">yes</td>
  48. * <td headers="ri op send_exc">yes</td>
  49. * <td headers="ri op send_oth">yes</td></tr>
  50. *
  51. * <tr><th id="args"><p align="left">arguments</p></th>
  52. * <td headers="ri args rec_req_ser_con">no </td>
  53. * <td headers="ri args rec_req">yes<sub>1</sub></td>
  54. * <td headers="ri args send_rep">yes</td>
  55. * <td headers="ri args send_exc">no<sub>2</sub></td>
  56. * <td headers="ri args send_oth">no<sub>2</sub>
  57. * </td></tr>
  58. *
  59. * <tr><th id="exps"><p align="left">exceptions</p></th>
  60. * <td headers="ri exps rec_req_ser_con">no </td>
  61. * <td headers="ri exps rec_req">yes</td>
  62. * <td headers="ri exps send_rep">yes</td>
  63. * <td headers="ri exps send_exc">yes</td>
  64. * <td headers="ri exps send_oth">yes</td></tr>
  65. *
  66. * <tr><th id="contexts"><p align="left">contexts</p></th>
  67. * <td headers="ri contexts rec_req_ser_con">no </td>
  68. * <td headers="ri contexts rec_req">yes</td>
  69. * <td headers="ri contexts send_rep">yes</td>
  70. * <td headers="ri contexts send_exc">yes</td>
  71. * <td headers="ri contexts send_oth">yes</td></tr>
  72. *
  73. * <tr><th id="op_con"><p align="left">operation_context</p></th>
  74. * <td headers="ri op_con rec_req_ser_con">no </td>
  75. * <td headers="ri op_con rec_req">yes</td>
  76. * <td headers="ri op_con send_rep">yes</td>
  77. * <td headers="ri op_con send_exc">no </td>
  78. * <td headers="ri op_con send_oth">no </td>
  79. * </tr>
  80. *
  81. * <tr><th id="result"><p align="left">result</p></th>
  82. * <td headers="ri result rec_req_ser_con">no </td>
  83. * <td headers="ri result rec_req">no </td>
  84. * <td headers="ri result send_rep">yes</td>
  85. * <td headers="ri result send_exc">no </td>
  86. * <td headers="ri result send_oth">no </td>
  87. * </tr>
  88. *
  89. * <tr><th id="res_ex"><p align="left">response_expected</p></th>
  90. * <td headers="ri res_ex rec_req_ser_con">yes</td>
  91. * <td headers="ri res_ex rec_req">yes</td>
  92. * <td headers="ri res_ex send_rep">yes</td>
  93. * <td headers="ri res_ex send_exc">yes</td>
  94. * <td headers="ri res_ex send_oth">yes</td></tr>
  95. *
  96. * <tr><th id="syn_scp"><p align="left">sync_scope</p></th>
  97. * <td headers="ri syn_scp rec_req_ser_con">yes</td>
  98. * <td headers="ri syn_scp rec_req">yes</td>
  99. * <td headers="ri syn_scp send_rep">yes</td>
  100. * <td headers="ri syn_scp send_exc">yes</td>
  101. * <td headers="ri syn_scp send_oth">yes</td></tr>
  102. *
  103. * <tr><td><b>request_id</b></td>
  104. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  105. *
  106. * <tr><td><b>operation</b></td>
  107. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  108. *
  109. * <tr><td><b>arguments</b></td>
  110. * <td>no </td> <td>yes<sub>1</sub</td>
  111. * <td>yes</td> <td>no<sub>2</sub></td>
  112. * <td>no<sub>2</sub>
  113. * </td></tr>
  114. *
  115. * <tr><td><b>exceptions</b></td>
  116. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  117. *
  118. * <tr><td><b>contexts</b></td>
  119. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  120. *
  121. * <tr><td><b>operation_context</b></td>
  122. * <td>no </td> <td>yes</td> <td>yes</td> <td>no </td> <td>no </td></tr>
  123. *
  124. * <tr><td><b>result</b></td>
  125. * <td>no </td> <td>no </td> <td>yes</td> <td>no </td> <td>no </td></tr>
  126. *
  127. * <tr><td><b>response_expected</b></td>
  128. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  129. *
  130. * <tr><td><b>sync_scope</b></td>
  131. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  132. *
  133. * <tr><td><b>reply_status</b></td>
  134. * <td>no </td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  135. *
  136. * <tr><td><b>forward_reference</b></td>
  137. * <td>no </td> <td>no </td> <td>no </td> <td>no </td> <td>yes<sub>2</sub>
  138. * </td></tr>
  139. *
  140. * <tr><td><b>get_slot</b></td>
  141. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  142. *
  143. * <tr><td><b>get_request_service_context</b></td>
  144. * <td>yes</td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  145. *
  146. * <tr><td><b>get_reply_service_context</b></td>
  147. * <td>no </td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  148. *
  149. * <tr>
  150. * <td colspan=6><i>ServerRequestInfo-specific:</i></td>
  151. * </tr>
  152. *
  153. * <tr><td><b>sending_exception</b></td>
  154. * <td>no </td> <td>no </td> <td>no </td> <td>yes</td> <td>no </td></tr>
  155. *
  156. * <tr><td><b>object_id</b></td>
  157. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes<sub>3</sub></td>
  158. * <td>yes<sub>3</sub>
  159. * </td></tr>
  160. *
  161. * <tr><td><b>adapter_id</b></td>
  162. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes<sub>3</sub></td>
  163. * <td>yes<sub>3</sub>
  164. * </td></tr>
  165. *
  166. * <tr><td><b>server_id</b></td>
  167. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  168. *
  169. * <tr><td><b>orb_id</b></td>
  170. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  171. *
  172. * <tr><td><b>adapter_name</b></td>
  173. * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  174. *
  175. * <tr><td><b>target_most_derived_interface</b></td>
  176. * <td>no </td> <td>yes</td> <td>no<sub>4</sub></td>
  177. * <td>no<sub>4</sub></td>
  178. * <td>no<sub>4</sub>
  179. * </td></tr>
  180. *
  181. * <tr><td><b>get_server_policy</b></td>
  182. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  183. *
  184. * <tr><td><b>set_slot</b></td>
  185. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  186. *
  187. * <tr><td><b>target_is_a</b></td>
  188. * <td>no </td> <td>yes</td> <td>no<sub>4</sub></td>
  189. * <td>no<sub>4</sub></td>
  190. * <td>no<sub>4</sub>
  191. * </td></tr>
  192. *
  193. * <tr><td><b>add_reply_service_context</b></td>
  194. * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
  195. * </tbody>
  196. * </table>
  197. *
  198. * <ol>
  199. * <li>When <code>ServerRequestInfo</code> is passed to
  200. * <code>receive_request</code>, there is an entry in the list for
  201. * every argument, whether in, inout, or out. But only the in and
  202. * inout arguments will be available.</li>
  203. * <li>If the <code>reply_status</code> attribute is not
  204. * <code>LOCATION_FORWARD</code>, accessing this attribute will throw
  205. * <code>BAD_INV_ORDER</code> with a standard minor code of 14.</li>
  206. * <li>If the servant locator caused a location forward, or thrown an
  207. * exception, this attribute/operation may not be available in this
  208. * interception point. <code>NO_RESOURCES</code> with a standard minor
  209. * code of 1 will be thrown if it is not available.</li>
  210. * <li>The operation is not available in this interception point because
  211. * the necessary information requires access to the target object's
  212. * servant, which may no longer be available to the ORB. For example,
  213. * if the object's adapter is a POA that uses a
  214. * <code>ServantLocator</code>, then the ORB invokes the interception
  215. * point after it calls <code>ServantLocator.postinvoke()</code></li>.
  216. * </ol>
  217. *
  218. * @see ServerRequestInterceptor
  219. */
  220. public interface ServerRequestInfoOperations extends org.omg.PortableInterceptor.RequestInfoOperations
  221. {
  222. /**
  223. * Returns an any which contains the exception to be returned to
  224. * the client.
  225. * <p>
  226. * If the exception is a user exception which cannot be inserted into
  227. * an any (e.g., it is unknown or the bindings don't provide the
  228. * <code>TypeCode</code>), then this attribute will be an any
  229. * containing the system exception <code>UNKNOWN</code> with a
  230. * standard minor code of 1.
  231. *
  232. * @see <a href="package-summary.html#unimpl">
  233. * <code>PortableInterceptor</code> package comments for
  234. * limitations / unimplemented features</a>
  235. */
  236. org.omg.CORBA.Any sending_exception ();
  237. /**
  238. * Returns the opaque <code>object_id</code> describing the target of
  239. * the operation invocation.
  240. */
  241. byte[] object_id ();
  242. /**
  243. * Returns the opaque identifier for the object adapter.
  244. */
  245. byte[] adapter_id ();
  246. /**
  247. * Returns the server ID that was specified on ORB::init using the -ORBServerId
  248. * argument.
  249. */
  250. String server_id ();
  251. /**
  252. * Returns the ID that was used to create the ORB.
  253. */
  254. String orb_id ();
  255. /**
  256. * Returns the sequence of strings that identifies the object
  257. * adapter instance that is handling this request.
  258. */
  259. String[] adapter_name ();
  260. /**
  261. * Returns the repository id for the most derived interface of the
  262. * servant.
  263. */
  264. String target_most_derived_interface ();
  265. /**
  266. * Returns the policy in effect for this operation for the given
  267. * policy type. The returned <code>CORBA.Policy</code> object shall
  268. * only be a policy whose type was registered via
  269. * <code>register_policy_factory</code>.
  270. *
  271. * @param type The <code>CORBA.PolicyType</code> which specifies the
  272. * policy to be returned.
  273. * @return The <code>CORBA.Policy</code> obtained with the given
  274. * policy type.
  275. * @exception INV_POLICY thrown, with a standard minor code of 2, if
  276. * a policy for the given type was not registered via
  277. * <code>register_policy_factory</code>.
  278. * @see ORBInitInfo#register_policy_factory
  279. */
  280. org.omg.CORBA.Policy get_server_policy (int type);
  281. /**
  282. * Allows an Interceptor to set a slot in the
  283. * <code>PortableInterceptor.Current</code> that is in the scope of
  284. * the request. If data already exists in that slot, it will be
  285. * overwritten.
  286. *
  287. * @param id The id of the slot.
  288. * @param data The data, in the form of an any, to store in that slot.
  289. * @exception InvalidSlot thrown if the ID does not define an allocated
  290. * slot.
  291. * @see Current
  292. */
  293. void set_slot (int id, org.omg.CORBA.Any data) throws org.omg.PortableInterceptor.InvalidSlot;
  294. /**
  295. * Returns true if the servant is the given repository id,
  296. * false if it is not.
  297. *
  298. * @param id The caller wants to know if the servant is this
  299. * repository id.
  300. * @return Is the servant the given RepositoryId?
  301. */
  302. boolean target_is_a (String id);
  303. /**
  304. * Allows Interceptors to add service contexts to the request.
  305. * <p>
  306. * There is no declaration of the order of the service contexts.
  307. * They may or may not appear in the order that they are added.
  308. *
  309. * @param service_context The <code>IOP.ServiceContext</code> to add to
  310. * the reply.
  311. * @param replace Indicates the behavior of this operation when a
  312. * service context already exists with the given ID. If false,
  313. * then <code>BAD_INV_ORDER</code> with a standard minor code of 15
  314. * is thrown. If true, then the existing service context is
  315. * replaced by the new one.
  316. * @exception BAD_INV_ORDER thrown, with a standard minor code of 15, if
  317. * replace is false and a service context already exists with the
  318. * given ID.
  319. */
  320. void add_reply_service_context (org.omg.IOP.ServiceContext service_context, boolean replace);
  321. } // interface ServerRequestInfoOperations