1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/ServerRequestInterceptorOperations.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. * Server-side request interceptor.
  10. * <p>
  11. * A request Interceptor is designed to intercept the flow of a
  12. * request/reply sequence through the ORB at specific points so that
  13. * services can query the request information and manipulate the service
  14. * contexts which are propagated between clients and servers. The primary
  15. * use of request Interceptors is to enable ORB services to transfer
  16. * context information between clients and servers. There are two types
  17. * of request Interceptors: client-side and server-side.
  18. * <p>
  19. * To write a server-side Interceptor, implement the
  20. * ServerRequestInterceptor interface.
  21. *
  22. * @see ServerRequestInfo
  23. */
  24. public interface ServerRequestInterceptorOperations extends org.omg.PortableInterceptor.InterceptorOperations
  25. {
  26. /**
  27. * Allows the interceptor to process service context information.
  28. * <p>
  29. * At this interception point, Interceptors must get their service
  30. * context information from the incoming request transfer it to
  31. * <code>PortableInterceptor.Current</code>'s slots.
  32. * <p>
  33. * This interception point is called before the servant manager is called.
  34. * Operation parameters are not yet available at this point. This
  35. * interception point may or may not execute in the same thread as
  36. * the target invocation.
  37. * <p>
  38. * This interception point may throw a system exception. If it does,
  39. * no other Interceptors' <code>receive_request_service_contexts</code>
  40. * operations are called. Those Interceptors on the Flow Stack are
  41. * popped and their <code>send_exception</code> interception points are
  42. * called.
  43. * <p>
  44. * This interception point may also throw a <code>ForwardRequest</code>
  45. * exception. If an Interceptor throws this exception, no other
  46. * Interceptors' <code>receive_request_service_contexts</code> operations
  47. * are called. Those Interceptors on the Flow Stack are popped and
  48. * their <code>send_other</code> interception points are called.
  49. * <p>
  50. * Compliant Interceptors shall properly follow
  51. * <code>completion_status</code> semantics if they throw a system
  52. * exception from this interception point. The
  53. * <code>completion_status</code> shall be COMPLETED_NO.
  54. *
  55. * @param ri Information about the current request being intercepted.
  56. * @exception ForwardRequest If thrown, indicates to the ORB that a
  57. * retry of the request should occur with the new object given in
  58. * the exception.
  59. */
  60. void receive_request_service_contexts (org.omg.PortableInterceptor.ServerRequestInfo ri) throws org.omg.PortableInterceptor.ForwardRequest;
  61. /**
  62. * Allows an Interceptor to query request information after all the
  63. * information, including operation parameters, are available. This
  64. * interception point shall execute in the same thread as the target
  65. * invocation.
  66. * <p>
  67. * In the DSI model, since the parameters are first available when
  68. * the user code calls <code>arguments</code>, <code>receive_request</code>
  69. * is called from within <code>arguments</code>. It is possible that
  70. * <code>arguments</code> is not called in the DSI model. The target
  71. * may call <code>set_exception</code> before calling
  72. * <code>arguments</code>. The ORB shall guarantee that
  73. * <code>receive_request</code> is called once, either through
  74. * <code>arguments</code> or through <code>set_exception</code>. If it
  75. * is called through <code>set_exception</code>, requesting the
  76. * arguments will result in <code>NO_RESOURCES</code> being thrown with
  77. * a standard minor code of 1.
  78. * <p>
  79. * This interception point may throw a system exception. If it does, no
  80. * other Interceptors' <code>receive_request</code> operations are
  81. * called. Those Interceptors on the Flow Stack are popped and their
  82. * <code>send_exception</code> interception points are called.
  83. * <p>
  84. * This interception point may also throw a <code>ForwardRequest</code>
  85. * exception. If an Interceptor throws this exception, no other
  86. * Interceptors' <code>receive_request</code> operations are called.
  87. * Those Interceptors on the Flow Stack are popped and their
  88. * <code>send_other</code> interception points are called.
  89. * <p>
  90. * Compliant Interceptors shall properly follow
  91. * <code>completion_status</code> semantics if they throw a system
  92. * exception from this interception point. The
  93. * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
  94. *
  95. * @param ri Information about the current request being intercepted.
  96. * @exception ForwardRequest If thrown, indicates to the ORB that a
  97. * retry of the request should occur with the new object given in
  98. * the exception.
  99. */
  100. void receive_request (org.omg.PortableInterceptor.ServerRequestInfo ri) throws org.omg.PortableInterceptor.ForwardRequest;
  101. /**
  102. * Allows an Interceptor to query reply information and modify the
  103. * reply service context after the target operation has been invoked
  104. * and before the reply is returned to the client. This interception
  105. * point shall execute in the same thread as the target invocation.
  106. * <p>
  107. * This interception point may throw a system exception. If it does,
  108. * no other Interceptors' <code>send_reply</code> operations are called.
  109. * The remaining Interceptors in the Flow Stack shall have their
  110. * <code>send_exception</code> interception point called.
  111. * <p>
  112. * Compliant Interceptors shall properly follow
  113. * <code>completion_status</code> semantics if they throw a
  114. * system exception from this interception point. The
  115. * <code>completion_status</code> shall be <code>COMPLETED_YES</code>.
  116. *
  117. * @param ri Information about the current request being intercepted.
  118. */
  119. void send_reply (org.omg.PortableInterceptor.ServerRequestInfo ri);
  120. /**
  121. * Allows an Interceptor to query the exception information and modify
  122. * the reply service context before the exception is thrown to the client.
  123. * When an exception occurs, this interception point is called. This
  124. * interception point shall execute in the same thread as the target
  125. * invocation.
  126. * <p>
  127. * This interception point may throw a system exception. This has the
  128. * effect of changing the exception which successive Interceptors
  129. * popped from the Flow Stack receive on their calls to
  130. * <code>send_exception</code>. The exception thrown to the client will
  131. * be the last exception thrown by an Interceptor, or the original
  132. * exception if no Interceptor changes the exception.
  133. * <p>
  134. * This interception point may also throw a <code>ForwardRequest</code>
  135. * exception. If an Interceptor throws this exception, no other
  136. * Interceptors' <code>send_exception</code> operations are called. The
  137. * remaining Interceptors in the Flow Stack shall have their
  138. * <code>send_other</code> interception points called.
  139. * <p>
  140. * If the <code>completion_status</code> of the exception is not
  141. * <code>COMPLETED_NO</code>, then it is inappropriate for this
  142. * interception point to throw a <code>ForwardRequest</code> exception.
  143. * The request's at-most-once semantics would be lost.
  144. * <p>
  145. * Compliant Interceptors shall properly follow
  146. * <code>completion_status</code> semantics if they throw a system
  147. * exception from this interception point. If the original exception
  148. * is a system exception, the <code>completion_status</code> of the new
  149. * exception shall be the same as on the original. If the original
  150. * exception is a user exception, then the <code>completion_status</code>
  151. * of the new exception shall be <code>COMPLETED_YES</code>.
  152. *
  153. * @param ri Information about the current request being intercepted.
  154. * @exception ForwardRequest If thrown, indicates to the ORB that a
  155. * retry of the request should occur with the new object given in
  156. * the exception.
  157. */
  158. void send_exception (org.omg.PortableInterceptor.ServerRequestInfo ri) throws org.omg.PortableInterceptor.ForwardRequest;
  159. /**
  160. * Allows an Interceptor to query the information available when a
  161. * request results in something other than a normal reply or an
  162. * exception. For example, a request could result in a retry
  163. * (e.g., a GIOP Reply with a <code>LOCATION_FORWARD</code> status was
  164. * received). This interception point shall execute in the same thread
  165. * as the target invocation.
  166. * <p>
  167. * This interception point may throw a system exception. If it does,
  168. * no other Interceptors' <code>send_other</code> operations are called.
  169. * The remaining Interceptors in the Flow Stack shall have their
  170. * <code>send_exception</code> interception points called.
  171. * <p>
  172. * This interception point may also throw a <code>ForwardRequest</code>
  173. * exception. If an Interceptor throws this exception, successive
  174. * Interceptors' <code>send_other</code> operations are called with
  175. * the new information provided by the <code>ForwardRequest</code>
  176. * exception.
  177. * <p>
  178. * Compliant Interceptors shall properly follow
  179. * <code>completion_status</code> semantics if they throw a system
  180. * exception from this interception point. The
  181. * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
  182. *
  183. * @param ri Information about the current request being intercepted.
  184. * @exception ForwardRequest If thrown, indicates to the ORB that a
  185. * retry of the request should occur with the new object given in
  186. * the exception.
  187. */
  188. void send_other (org.omg.PortableInterceptor.ServerRequestInfo ri) throws org.omg.PortableInterceptor.ForwardRequest;
  189. } // interface ServerRequestInterceptorOperations