-
- All Superinterfaces:
- InterceptorOperations
- All Known Subinterfaces:
- ServerRequestInterceptor
public interface ServerRequestInterceptorOperations extends InterceptorOperations
Server-side request interceptor.A request Interceptor is designed to intercept the flow of a request/reply sequence through the ORB at specific points so that services can query the request information and manipulate the service contexts which are propagated between clients and servers. The primary use of request Interceptors is to enable ORB services to transfer context information between clients and servers. There are two types of request Interceptors: client-side and server-side.
To write a server-side Interceptor, implement the ServerRequestInterceptor interface.
- See Also:
ServerRequestInfo
-
-
Method Summary
Methods Modifier and Type Method and Description void
receive_request_service_contexts(ServerRequestInfo ri)
Allows the interceptor to process service context information.void
receive_request(ServerRequestInfo ri)
Allows an Interceptor to query request information after all the information, including operation parameters, are available.void
send_exception(ServerRequestInfo ri)
Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client.void
send_other(ServerRequestInfo ri)
Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.void
send_reply(ServerRequestInfo ri)
Allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client.
-
-
-
Method Detail
-
receive_request_service_contexts
void receive_request_service_contexts(ServerRequestInfo ri) throws ForwardRequest
Allows the interceptor to process service context information.At this interception point, Interceptors must get their service context information from the incoming request transfer it to
PortableInterceptor.Current
's slots.This interception point is called before the servant manager is called. Operation parameters are not yet available at this point. This interception point may or may not execute in the same thread as the target invocation.
This interception point may throw a system exception. If it does, no other Interceptors'
receive_request_service_contexts
operations are called. Those Interceptors on the Flow Stack are popped and theirsend_exception
interception points are called.This interception point may also throw a
ForwardRequest
exception. If an Interceptor throws this exception, no other Interceptors'receive_request_service_contexts
operations are called. Those Interceptors on the Flow Stack are popped and theirsend_other
interception points are called.Compliant Interceptors shall properly follow
completion_status
semantics if they throw a system exception from this interception point. Thecompletion_status
shall be COMPLETED_NO.- Parameters:
ri
- Information about the current request being intercepted.- Throws:
ForwardRequest
- If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.
-
receive_request
void receive_request(ServerRequestInfo ri) throws ForwardRequest
Allows an Interceptor to query request information after all the information, including operation parameters, are available. This interception point shall execute in the same thread as the target invocation.In the DSI model, since the parameters are first available when the user code calls
arguments
,receive_request
is called from withinarguments
. It is possible thatarguments
is not called in the DSI model. The target may callset_exception
before callingarguments
. The ORB shall guarantee thatreceive_request
is called once, either througharguments
or throughset_exception
. If it is called throughset_exception
, requesting the arguments will result inNO_RESOURCES
being thrown with a standard minor code of 1.This interception point may throw a system exception. If it does, no other Interceptors'
receive_request
operations are called. Those Interceptors on the Flow Stack are popped and theirsend_exception
interception points are called.This interception point may also throw a
ForwardRequest
exception. If an Interceptor throws this exception, no other Interceptors'receive_request
operations are called. Those Interceptors on the Flow Stack are popped and theirsend_other
interception points are called.Compliant Interceptors shall properly follow
completion_status
semantics if they throw a system exception from this interception point. Thecompletion_status
shall beCOMPLETED_NO
.- Parameters:
ri
- Information about the current request being intercepted.- Throws:
ForwardRequest
- If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.
-
send_reply
void send_reply(ServerRequestInfo ri)
Allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client. This interception point shall execute in the same thread as the target invocation.This interception point may throw a system exception. If it does, no other Interceptors'
send_reply
operations are called. The remaining Interceptors in the Flow Stack shall have theirsend_exception
interception point called.Compliant Interceptors shall properly follow
completion_status
semantics if they throw a system exception from this interception point. Thecompletion_status
shall beCOMPLETED_YES
.- Parameters:
ri
- Information about the current request being intercepted.
-
send_exception
void send_exception(ServerRequestInfo ri) throws ForwardRequest
Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client. When an exception occurs, this interception point is called. This interception point shall execute in the same thread as the target invocation.This interception point may throw a system exception. This has the effect of changing the exception which successive Interceptors popped from the Flow Stack receive on their calls to
send_exception
. The exception thrown to the client will be the last exception thrown by an Interceptor, or the original exception if no Interceptor changes the exception.This interception point may also throw a
ForwardRequest
exception. If an Interceptor throws this exception, no other Interceptors'send_exception
operations are called. The remaining Interceptors in the Flow Stack shall have theirsend_other
interception points called.If the
completion_status
of the exception is notCOMPLETED_NO
, then it is inappropriate for this interception point to throw aForwardRequest
exception. The request's at-most-once semantics would be lost.Compliant Interceptors shall properly follow
completion_status
semantics if they throw a system exception from this interception point. If the original exception is a system exception, thecompletion_status
of the new exception shall be the same as on the original. If the original exception is a user exception, then thecompletion_status
of the new exception shall beCOMPLETED_YES
.- Parameters:
ri
- Information about the current request being intercepted.- Throws:
ForwardRequest
- If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.
-
send_other
void send_other(ServerRequestInfo ri) throws ForwardRequest
Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception. For example, a request could result in a retry (e.g., a GIOP Reply with aLOCATION_FORWARD
status was received). This interception point shall execute in the same thread as the target invocation.This interception point may throw a system exception. If it does, no other Interceptors'
send_other
operations are called. The remaining Interceptors in the Flow Stack shall have theirsend_exception
interception points called.This interception point may also throw a
ForwardRequest
exception. If an Interceptor throws this exception, successive Interceptors'send_other
operations are called with the new information provided by theForwardRequest
exception.Compliant Interceptors shall properly follow
completion_status
semantics if they throw a system exception from this interception point. Thecompletion_status
shall beCOMPLETED_NO
.- Parameters:
ri
- Information about the current request being intercepted.- Throws:
ForwardRequest
- If thrown, indicates to the ORB that a retry of the request should occur with the new object given in the exception.
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-org/omg/portableinterceptor/serverrequestinterceptoroperations.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.