1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/RequestInfoOperations.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
  6. * Monday, February 23, 2004 7:03:06 AM GMT
  7. */
  8. /**
  9. * Request Information, accessible to Interceptors.
  10. * <p>
  11. * Each interception point is given an object through which the
  12. * Interceptor can access request information. Client-side and server-side
  13. * interception points are concerned with different information, so there
  14. * are two information objects: <code>ClientRequestInfo</code> is passed
  15. * to the client-side interception points and <code>ServerRequestInfo</code>
  16. * is passed to the server-side interception points. But there is
  17. * information that is common to both, so they both inherit from a common
  18. * interface: <code>RequestInfo</code>.
  19. *
  20. * @see ClientRequestInfo
  21. * @see ServerRequestInfo
  22. */
  23. public interface RequestInfoOperations
  24. {
  25. /**
  26. * Returns an id that uniquely identifies an active request/reply
  27. * sequence. Once a request/reply sequence is concluded this ID may be
  28. * reused. Note that this id is not the same as the GIOP
  29. * <code>request_id</code>. If GIOP is the transport mechanism used,
  30. * then these IDs may very well be the same, but this is not guaranteed
  31. * nor required.
  32. */
  33. int request_id ();
  34. /**
  35. * Returns the name of the operation being invoked.
  36. */
  37. String operation ();
  38. /**
  39. * Returns an array of <code>Parameter</code> objects, containing the
  40. * arguments on the operation being invoked. If there are no arguments,
  41. * this attribute will be a zero length array.
  42. * <p>
  43. * Not all environments provide access to the arguments. With the Java
  44. * portable bindings, for example, the arguments are not available.
  45. * In these environments, when this attribute is accessed,
  46. * <code>NO_RESOURCES</code> will be thrown with a standard minor code
  47. * of 1.
  48. * <p>
  49. * <i>Note: Arguments are available for DSI/DII calls.</i>
  50. *
  51. * @exception NO_RESOURCES thrown if arguments are not available.
  52. * @see <a href="package-summary.html#unimpl">
  53. * <code>PortableInterceptor</code> package comments for
  54. * limitations / unimplemented features</a>
  55. */
  56. org.omg.Dynamic.Parameter[] arguments ();
  57. /**
  58. * Returns an array of <code>TypeCode</code> objects describing the
  59. * <code>TypeCode</code>s of the user exceptions that this operation
  60. * invocation may throw. If there are no user exceptions, this
  61. * will return a zero length array.
  62. * <p>
  63. * Not all environments provide access to the exception list. With
  64. * the Java portable bindings, for example, the exception list is
  65. * not available. In these environments, when this attribute is
  66. * accessed, <code>NO_RESOURCES</code> will be thrown with a
  67. * standard minor code of 1.
  68. * <p>
  69. * <i>Note: Exceptions are available for DSI/DII calls.</i>
  70. *
  71. * @exception NO_RESOURCES thrown if exceptions are not available.
  72. * @see <a href="package-summary.html#unimpl">
  73. * <code>PortableInterceptor</code> package comments for
  74. * limitations / unimplemented features</a>
  75. */
  76. org.omg.CORBA.TypeCode[] exceptions ();
  77. /**
  78. * Returns an array of <code>String</code> objects describing the
  79. * contexts that may be passed on this operation invocation. If there
  80. * are no contexts, this will return a zero length array.
  81. * <p>
  82. * Not all environments provide access to the context list. With the
  83. * Java portable bindings, for example, the context list is not
  84. * available. In these environments, when this attribute is accessed,
  85. * <code>NO_RESOURCES</code> will be thrown with a standard minor code
  86. * of 1.
  87. * <p>
  88. * <i>Note: Contexts are available for DSI/DII calls.</i>
  89. *
  90. * @exception NO_RESOURCES thrown if contexts are not available.
  91. * @see <a href="package-summary.html#unimpl">
  92. * <code>PortableInterceptor</code> package comments for
  93. * limitations / unimplemented features</a>
  94. */
  95. String[] contexts ();
  96. /**
  97. * Returns an array of <code>String</code> objects containing the
  98. * contexts being sent on the request.
  99. * <p>
  100. * Not all environments provide access to the context. With the Java
  101. * portable bindings, for example, the context is not available. In
  102. * these environments, when this attribute is accessed, NO_RESOURCES will
  103. * be thrown with standard minor code of 1.
  104. * <p>
  105. * <i>Note: <code>operation_context</code> is available for
  106. * DSI/DII calls.</i>
  107. *
  108. * @exception NO_RESOURCES thrown if operation context is not available.
  109. * @see <a href="package-summary.html#unimpl">
  110. * <code>PortableInterceptor</code> package comments for
  111. * limitations / unimplemented features</a>
  112. */
  113. String[] operation_context ();
  114. /**
  115. * Returns an any containing the result of the operation invocation.
  116. * If the operation return type is void, this attribute will be an any
  117. * containing a type code with a <code>TCKind</code> value of
  118. * <code>tk_void</code> and no value.
  119. * <p>
  120. * Not all environments provide access to the result. With the Java
  121. * portable bindings, for example, the result is not available. In
  122. * these environments, when this attribute is accessed,
  123. * <code>NO_RESOURCES</code> will be thrown with a standard minor code of
  124. * 1.
  125. * <p>
  126. * <i>Note: Result is available for DSI/DII calls.</i>
  127. *
  128. * @exception NO_RESOURCES thrown if result is not available.
  129. * @see <a href="package-summary.html#unimpl">
  130. * <code>PortableInterceptor</code> package comments for
  131. * limitations / unimplemented features</a>
  132. */
  133. org.omg.CORBA.Any result ();
  134. /**
  135. * Indicates whether a response is expected.
  136. * <p>
  137. * On the client, a reply is not returned when
  138. * <code>response_expected</code> is false, so <code>receive_reply</code>
  139. * cannot be called. <code>receive_other</code> is called unless an
  140. * exception occurs, in which case <code>receive_exception</code> is
  141. * called.
  142. * <p>
  143. * On the client, within <code>send_poll</code>, this attribute is true.
  144. */
  145. boolean response_expected ();
  146. /**
  147. * Defines how far the request shall progress before control is returned
  148. * to the client. This is defined in the Messaging specification, and
  149. * is pertinent only when <code>response_expected</code> is false. If
  150. * <code>response_expected</code> is true, the value of
  151. * <code>sync_scope</code> is undefined. This attribute may have one of
  152. * the following values:
  153. * <ul>
  154. * <li><code>Messaging.SYNC_NONE</code></li>
  155. * <li><code>Messaging.SYNC_WITH_TRANSPORT</code></li>
  156. * <li><code>Messaging.SYNC_WITH_SERVER</code></li>
  157. * <li><code>Messaging.SYNC_WITH_TARGET</code></li>
  158. * </ul>
  159. * On the server, for all scopes, a reply will be created from the
  160. * return of the target operation call, but the reply will not return
  161. * to the client. Although it does not return to the client, it does
  162. * occur, so the normal server-side interception points are
  163. * followed (i.e., <code>receive_request_service_contexts</code>,
  164. * <code>receive_request</code>, <code>send_reply</code> or
  165. * <code>send_exception</code>).
  166. * <p>
  167. * For <code>SYNC_WITH_SERVER</code> and <code>SYNC_WITH_TARGET</code>,
  168. * the server does send an empty reply back to the client before the
  169. * target is invoked. This reply is not intercepted by server-side
  170. * Interceptors.
  171. *
  172. * @see <a href="package-summary.html#unimpl">
  173. * <code>PortableInterceptor</code> package comments for
  174. * limitations / unimplemented features</a>
  175. */
  176. short sync_scope ();
  177. /**
  178. * Describes the state of the result of the operation invocation. The
  179. * return value can be one of the following:
  180. * <ul>
  181. * <li><code>PortableInterceptor.SUCCESSFUL</code></li>
  182. * <li><code>PortableInterceptor.SYSTEM_EXCEPTION</code></li>
  183. * <li><code>PortableInterceptor.USER_EXCEPTION</code></li>
  184. * <li><code>PortableInterceptor.LOCATION_FORWARD</code></li>
  185. * <li><code>PortableInterceptor.TRANSPORT_RETRY</code></li>
  186. * </ul>
  187. * On the client:
  188. * <ul>
  189. * <li>Within the <code>receive_reply</code> interception point, this
  190. * will only return <code>SUCCESSFUL</code></li>.
  191. * <li>Within the <code>receive_exception</code> interception point,
  192. * this will be either <code>SYSTEM_EXCEPTION</code> or
  193. * <code>USER_EXCEPTION</code>.</li>
  194. * <li>Within the <code>receive_other</code> interception point, this
  195. * will be any of: <code>SUCCESSFUL</code>,
  196. * <code>LOCATION_FORWARD</code>, or <code>TRANSPORT_RETRY</code>.
  197. * <code>SUCCESSFUL</code> means an asynchronous request returned
  198. * successfully. <code>LOCATION_FORWARD</code> means that a reply
  199. * came back with <code>LOCATION_FORWARD</code> as its status.
  200. * <code>TRANSPORT_RETRY</code> means that the transport
  201. * mechanism indicated a retry - a GIOP reply with a status of
  202. * <code>NEEDS_ADDRESSING_MODE</code>, for instance. </li>
  203. * </ul>
  204. * On the server:
  205. * <ul>
  206. * <li>Within the <code>send_reply</code> interception point, this
  207. * will only be <code>SUCCESSFUL</code>.</li>
  208. * <li>Within the <code>send_exception</code> interception point,
  209. * this will be either <code>SYSTEM_EXCEPTION</code> or
  210. * <code>USER_EXCEPTION</code>.</li>
  211. * <li>Within the <code>send_other</code> interception point, this
  212. * attribute will be any of: <code>SUCCESSFUL</code>, or
  213. * <code>LOCATION_FORWARD</code>. <code>SUCCESSFUL</code> means
  214. * an asynchronous request returned successfully.
  215. * <code>LOCATION_FORWARD</code> means that a reply came back
  216. * with <code>LOCATION_FORWARD</code> as its status.</li>
  217. * </ul>
  218. *
  219. * @see SUCCESSFUL
  220. * @see SYSTEM_EXCEPTION
  221. * @see USER_EXCEPTION
  222. * @see LOCATION_FORWARD
  223. * @see TRANSPORT_RETRY
  224. */
  225. short reply_status ();
  226. /**
  227. * Contains the object to which the request will be forwarded, if the
  228. * <code>reply_status</code> attribute is <code>LOCATION_FORWARD</code>.
  229. * It is indeterminate whether a forwarded request will actually occur.
  230. */
  231. org.omg.CORBA.Object forward_reference ();
  232. /**
  233. * Returns the data from the given slot of the
  234. * <code>PortableInterceptor.Current</code> that is in the scope of
  235. * the request.
  236. * <p>
  237. * If the given slot has not been set, then an any containing a
  238. * type code with a <code>TCKind</code> value of <code>tk_null</code> is
  239. * returned.
  240. *
  241. * @param id The <code>SlotId</code> of the slot which is to be
  242. * returned.
  243. * @return The slot data, in the form of an any, obtained with the
  244. * given identifier.
  245. * @exception InvalidSlot thrown if the ID does not define an
  246. * allocated slot.
  247. * @see Current
  248. */
  249. org.omg.CORBA.Any get_slot (int id) throws org.omg.PortableInterceptor.InvalidSlot;
  250. /**
  251. * Returns a copy of the service context with the given ID that
  252. * is associated with the request.
  253. * <p>
  254. * @param id The <code>IOP.ServiceId</code> of the service context
  255. * which is to be returned.
  256. * @return The <code>IOP.ServiceContext</code> obtained with the
  257. * given identifier.
  258. * @exception BAD_PARAM thrown with a standard minor code of 26, if the
  259. * request's service context does not contain an entry for that ID.
  260. */
  261. org.omg.IOP.ServiceContext get_request_service_context (int id);
  262. /**
  263. * Returns a copy of the service context with the given ID that
  264. * is associated with the reply.
  265. *
  266. * @param id The <code>IOP.ServiceId</code> of the service context
  267. * which is to be returned.
  268. * @return The <code>IOP.ServiceContext</code> obtained with the given
  269. * identifier.
  270. * @exception BAD_PARAM thrown with a standard minor code of 26 if the
  271. * request's service context does not contain an entry for that ID.
  272. */
  273. org.omg.IOP.ServiceContext get_reply_service_context (int id);
  274. } // interface RequestInfoOperations