Skip navigation.

Using CORBA Request-Level Interceptors

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

 


TargetRequestInterceptor::target_response

Synopsis

Is called by the target-side ORB anytime that a reply to an invocation is being sent to the initiator of the request.

C++ Binding

virtual Interceptors::ResponseReturnStatus 
target_response(
const ReplyContext & reply_context,
ServiceContextList_ptr service_context,
CORBA::DataInputStream_ptr arg_stream,
CORBA::Exception_ptr & excep_val ) = 0;

Parameters

reply_context

A reference to a ReplyContext that contains information about the context in which the reply is being performed.

service_context

A pointer to a ServiceContextList containing service context information to be sent as a result of processing the request by the target object.

Note: In BEA Tuxedo 8.0, the value of this parameter is always a nil object.

arg_stream

A pointer to a DataInputStream that can be used by the interceptor implementation to retrieve the value of the reply parameters of the operation.

The following table identifies what the target_response method returns in the DataInputStream object based on the status contained in the ReplyContext object:

Status Value

Description

LOCATION_FORWARD, LOCATION_FORWARD_PERM, or NEEDS_ADDRESSING_MODE

A nil DataInputStream is supplied

NO_EXCEPTION

The DataInputStream contains first any operation return value, then any inout and out parameters in the order in which they appear in the operation's IDL definition, from left to right. A nil DataInputStream indicates that no arguments exist.

USER_EXCEPTION or SYSTEM_EXCEPTION

The DataInputStream contains the exception that was raised by the operation.


 

Note: Exceptions contain a string followed by any exception members. The string contains the repository ID for the exception. The exception members are passed in the same manner as a struct. A system exception contains two unsigned long members, a minor code, and a completion status.

excep_val

A reference to a location in which the interceptor can return an exception in order to report an error. The use of this parameter is valid only if a status of REPLY_EXCEPTION is returned. Note that the ORB is responsible for the memory management for the excep_val parameter.

Exceptions

None.

Description

The target_response operation is called on an interceptor implementation that supports the RequestLevelInterceptor::TargetRequestInterceptor interface. The operation is called by the target-side ORB anytime that a reply to an invocation is being sent to the initiator of the request, regardless of whether the initiator is in a different address space or the same address space as the target object.

Return Values

RESPONSE_NO_EXCEPTION

Indicates that the interceptor successfully performed any processing required and that the ORB should continue processing the reply to the request to deliver it to the initiator of the request.

RESPONSE_EXCEPTION

Indicates that the interceptor encountered an error. The parameter excep_val is used to report the exception to the ORB. Any interceptors not yet called on the way back to the client have their exception_occurred operation called by the ORB in order to notify them that processing the request has failed. Note that the ORB is responsible for the memory management for the excep_val parameter.

 

Skip navigation bar  Back to Top Previous Next