#include <AMH_Response_Handler.h>
Collaboration diagram for TAO_AMH_Response_Handler:
Public Methods | |
TAO_AMH_Response_Handler (TAO_ServerRequest &server_request) | |
Stores necessary information from a TAO_Server_Request onto the heap. More... | |
virtual | ~TAO_AMH_Response_Handler (void) |
Releases the transport and in case of an error, sends the appropriate exception back to the client. More... | |
Protected Methods | |
void | _tao_rh_init_reply (ACE_ENV_SINGLE_ARG_DECL) |
Sets up the various paramters in anticipation of returning a reply to the client. return/OUT/INOUT arguments are marshalled into the Output stream after this method has been called. More... | |
void | _tao_rh_send_reply (ACE_ENV_SINGLE_ARG_DECL) |
Sends the marshalled reply back to the client. More... | |
void | _tao_rh_send_exception (CORBA::Exception &ex ACE_ENV_ARG_DECL) |
Send back an exception to the client. More... | |
Protected Attributes | |
TAO_OutputCDR | _tao_out |
The IDL-generated ResponseHandler implementations used this field to marshal the response. More... | |
Private Types | |
enum | Reply_Status { TAO_RS_UNINITIALIZED, TAO_RS_INITIALIZED, TAO_RS_SENDING, TAO_RS_SENT } |
Various states the ResponseHnadler can be in. More... | |
Private Methods | |
TAO_AMH_Response_Handler (const TAO_AMH_Response_Handler &) | |
TAO_AMH_Response_Handler & | operator= (const TAO_AMH_Response_Handler &) |
Private Attributes | |
TAO_Pluggable_Messaging * | mesg_base_ |
Pointer to the original message-base. More... | |
CORBA::ULong | request_id_ |
Copy of the request-id of the original Server-Request. More... | |
TAO_Transport * | transport_ |
Handle to transport through which the reply will be sent Copy of transport in original Server_Request. More... | |
TAO_ORB_Core * | orb_core_ |
A pointer to the ORB Core for the context where the request was created. More... | |
TAO_Service_Context | reply_service_context_ |
The reply service context. More... | |
CORBA::Boolean | argument_flag_ |
Alwyas set to true (we always have soemthing to return to the client. More... | |
CORBA::ULong | exception_type_ |
Exception type (will be NO_EXCEPTION in the majority of the cases). More... | |
Reply_Status | reply_status_ |
TAO_SYNCH_MUTEX | mutex_ |
Mutex to ensure the AMH-RH method call is thread-safe. More... |
Class encapsulates state required to send a response back to the client independent of the thread that originally created the state on the activation-record. Thus the required state (copied from TAO_Server_Request) is 'stored' on the heap.
One RH is created for every client request and the RH can be used only once i.e., the asynchronous method can be called only once. This class also encapsulates various initialisation and response-sending functionality that is common to all RHs (generated by the IDL compiler). Thus the IDL-compiler has to generate less code which in turn reduces the overall code size for an application.
|
Various states the ResponseHnadler can be in. These states represent various states the RH can be in and the states are used not only in implementing the 'once-only semantics of RHs, but in making sure well the call thread-safe as well. |
|
Stores necessary information from a TAO_Server_Request onto the heap.
|
|
Releases the transport and in case of an error, sends the appropriate exception back to the client.
|
|
|
|
Sets up the various paramters in anticipation of returning a reply to the client. return/OUT/INOUT arguments are marshalled into the Output stream after this method has been called.
|
|
Send back an exception to the client.
|
|
Sends the marshalled reply back to the client.
|
|
|
|
The IDL-generated ResponseHandler implementations used this field to marshal the response. Making it a field instead of a public accessor makes the code in the generated ResponseHandler implementation a lot more readable. |
|
Alwyas set to true (we always have soemthing to return to the client.
|
|
Exception type (will be NO_EXCEPTION in the majority of the cases).
|
|
Pointer to the original message-base.
|
|
Mutex to ensure the AMH-RH method call is thread-safe.
|
|
A pointer to the ORB Core for the context where the request was created.
|
|
The reply service context.
|
|
|
|
Copy of the request-id of the original Server-Request.
|
|
Handle to transport through which the reply will be sent Copy of transport in original Server_Request.
|