#include <operation_details.h>
Collaboration diagram for TAO_Operation_Details:
Helper methods used by the Invocation classes. | |
bool | marshal_args (TAO_OutputCDR &cdr) |
Marshals the list of <this->arg_> into the cdr. | |
bool | demarshal_args (TAO_InputCDR &cdr) |
Demarshals the list of <this->arg_> into the cdr. | |
TAO::Argument ** | args (void) const |
Accessors for the argument list. | |
CORBA::ULong | args_num (void) const |
Marshals the list of <this->arg_> into the cdr. | |
CORBA::ULong | ex_count (void) const |
Exception count. | |
TAO::Exception_Data const * | ex_data (void) const |
Marshals the list of <this->arg_> into the cdr. | |
CORBA::Boolean | use_stub_args (void) const |
Marshals the list of <this->arg_> into the cdr. | |
void | use_stub_args (CORBA::Boolean use_stub_arguments) |
Marshals the list of <this->arg_> into the cdr. | |
void | ft_expiration_time (TimeBase::TimeT time) |
Marshals the list of <this->arg_> into the cdr. | |
TimeBase::TimeT | ft_expiration_time (void) const |
Marshals the list of <this->arg_> into the cdr. | |
void | ft_retention_id (CORBA::Long request_id) |
Marshals the list of <this->arg_> into the cdr. | |
CORBA::Long | ft_retention_id (void) const |
Marshals the list of <this->arg_> into the cdr. | |
TAO::Collocated_Arguments_Converter * | cac (void) const |
Accessor for cac_ pointer. | |
void | cac (TAO::Collocated_Arguments_Converter *cac) |
Marshals the list of <this->arg_> into the cdr. | |
TAO_Reply_Dispatcher * | reply_dispatcher (void) const |
Marshals the list of <this->arg_> into the cdr. | |
void | reply_dispatcher (TAO_Reply_Dispatcher *rd) |
Marshals the list of <this->arg_> into the cdr. | |
const char * | opname_ |
Name of the operation being invoked. | |
CORBA::ULong | opname_len_ |
Precalculated length of opname_. | |
CORBA::ULong | request_id_ |
Request ID of this operation. | |
CORBA::Octet | response_flags_ |
Response flags. | |
TAO_Service_Context | request_service_info_ |
TAO_Service_Context | reply_service_info_ |
TAO_Target_Specification::TAO_Target_Address | addressing_mode_ |
Addressing mode for this request. | |
TAO::Argument ** | args_ |
CORBA::ULong | num_args_ |
Number of arguments including the return value. | |
TAO::Exception_Data * | ex_data_ |
The type of exceptions that the operations can throw. | |
CORBA::ULong | ex_count_ |
Count of the exceptions that operations can throw. | |
CORBA::Boolean | use_stub_args_ |
TimeBase::TimeT | ft_expiration_time_ |
FT request expiration time (absolute gregorian). | |
CORBA::Long | ft_retention_id_ |
FT request retention id. | |
TAO::Collocated_Arguments_Converter * | cac_ |
The optional collocated arguments converter. | |
TAO_Reply_Dispatcher * | reply_dispatcher_ |
The optional reply dispatcher. | |
Public Member Functions | |
TAO_Operation_Details (const char *name, CORBA::ULong len, TAO::Argument **args=0, CORBA::ULong num_args=0, TAO::Exception_Data *ex_data=0, CORBA::ULong ex_count=0) | |
Constructor. | |
const char * | opname (void) const |
Operation name. | |
CORBA::ULong | opname_len (void) const |
Length of the operation name. | |
CORBA::Boolean | argument_flag (void) const |
void | response_flags (CORBA::Octet flags) |
Set the response flags. | |
CORBA::Octet | response_flags (void) const |
Get the response flags. | |
IOP::ServiceContextList & | request_service_info (void) |
Accessors for the service context list. | |
const IOP::ServiceContextList & | request_service_info (void) const |
IOP::ServiceContextList & | reply_service_info (void) |
const IOP::ServiceContextList & | reply_service_info (void) const |
TAO_Service_Context & | request_service_context (void) |
Access the TAO_Service_Context. | |
const TAO_Service_Context & | request_service_context (void) const |
TAO_Service_Context & | reply_service_context (void) |
const TAO_Service_Context & | reply_service_context (void) const |
void | reset_request_service_info (void) |
Reset the contents of the service context lists that we hold. | |
void | reset_reply_service_info (void) |
void | request_id (CORBA::ULong id) |
Cache the request id. | |
CORBA::ULong | request_id (void) const |
Return the request ID associated with the operation. | |
TAO_Target_Specification::TAO_Target_Address | addressing_mode (void) const |
Accessor method for the addressing mode. | |
void | addressing_mode (CORBA::Short addr) |
Set method for the addressing mode. | |
CORBA::Exception * | corba_exception (const char *ex) const |
bool | has_exception (::CORBA::Exception &ex) const |
Check whether exception ex is in the signature of this operation. | |
Friends | |
class | TAO::CSD::FW_Server_Request_Wrapper |
This class stores some of the "operation" details that would be required by the invocation classes. This class is in its infancy now but I expect this one to grow as we come with different varieties of use cases.
Definition at line 64 of file operation_details.h.
|
Constructor.
Definition at line 8 of file operation_details.inl.
00014 : opname_ (name) 00015 , opname_len_ (len) 00016 , request_id_ (0) 00017 , response_flags_ (0) 00018 , addressing_mode_ (TAO_Target_Specification::Key_Addr) 00019 , args_ (args) 00020 , num_args_ (num) 00021 , ex_data_ (data) 00022 , ex_count_ (count) 00023 , use_stub_args_ (args ? true : false) 00024 #if TAO_HAS_INTERCEPTORS == 1 00025 , ft_expiration_time_ (0) 00026 , ft_retention_id_ (0) 00027 #endif /*TAO_HAS_INTERCEPTORS == 1*/ 00028 , cac_ (0) 00029 , reply_dispatcher_ (0) 00030 { 00031 } |
|
Set method for the addressing mode.
Definition at line 153 of file operation_details.inl. References addressing_mode_.
00154 { 00155 if (mode == 0) 00156 this->addressing_mode_ = TAO_Target_Specification::Key_Addr; 00157 else if (mode == 1) 00158 this->addressing_mode_ = TAO_Target_Specification::Profile_Addr; 00159 else if (mode == 2) 00160 this->addressing_mode_ = TAO_Target_Specification::Reference_Addr; 00161 } |
|
Accessor method for the addressing mode.
Definition at line 147 of file operation_details.inl. References addressing_mode_.
00148 { 00149 return this->addressing_mode_; 00150 } |
|
Accessors for the argument list.
Definition at line 164 of file operation_details.inl. Referenced by TAO::Collocated_Invocation::invoke().
00165 { 00166 return this->args_; 00167 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 170 of file operation_details.inl. References num_args_. Referenced by TAO::Collocated_Invocation::invoke().
00171 { 00172 return this->num_args_; 00173 } |
|
Return the flag that indicates whether the operation has any arguments Definition at line 46 of file operation_details.inl. References num_args_. Referenced by TAO_GIOP_Message_Generator_Parser_12::write_request_header().
00047 { 00048 return (this->num_args_ > 1); 00049 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 220 of file operation_details.inl. References cac_.
00221 { 00222 this->cac_ = cac; 00223 } |
|
Accessor for cac_ pointer.
Definition at line 214 of file operation_details.inl. References cac_.
00215 { 00216 return this->cac_; 00217 } |
|
This step is important to decode the exception that the client got from the server. If the exception received from the server is not found in the list of exceptions specified by the operation this call would raise an UNKNOWN exception. Definition at line 24 of file operation_details.cpp. References TAO::Exception_Data::alloc, ex_count_, ex_data_, and ACE_OS::strcmp(). Referenced by TAO::Synch_Twoway_Invocation::handle_user_exception().
00025 { 00026 for (CORBA::ULong i = 0; i != this->ex_count_; ++i) 00027 { 00028 if (ACE_OS::strcmp (id, this->ex_data_[i].id) != 0) 00029 { 00030 continue; 00031 } 00032 00033 // Create an exception object 00034 CORBA::Exception *exception = this->ex_data_[i].alloc (); 00035 00036 if (exception == 0) 00037 { 00038 throw ::CORBA::NO_MEMORY (0, CORBA::COMPLETED_YES); 00039 } 00040 00041 // Return the exception object that we just created. 00042 return exception; 00043 } 00044 00045 // If there are no matches return an unknown exception. 00046 throw ::CORBA::UNKNOWN (0, CORBA::COMPLETED_YES); 00047 } |
|
Demarshals the list of <this->arg_> into the cdr.
Definition at line 80 of file operation_details.cpp. References num_args_. Referenced by TAO::Synch_Twoway_Invocation::check_reply_status().
|
|
Exception count.
Definition at line 129 of file operation_details.inl. References ex_count_.
00130 { 00131 return this->ex_count_; 00132 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 135 of file operation_details.inl. References ex_data_.
00136 { 00137 return this->ex_data_; 00138 } |
|
Marshals the list of <this->arg_> into the cdr.
|
|
Marshals the list of <this->arg_> into the cdr.
|
|
Marshals the list of <this->arg_> into the cdr.
|
|
Marshals the list of <this->arg_> into the cdr.
|
|
Check whether exception ex is in the signature of this operation.
Definition at line 50 of file operation_details.cpp. References CORBA::Exception::_rep_id(), ex_count_, ex_data_, TAO::Exception_Data::id, and ACE_OS::strcmp(). Referenced by TAO::Collocated_Invocation::invoke().
00051 { 00052 for (CORBA::ULong i = 0; i != this->ex_count_; ++i) 00053 { 00054 if (ACE_OS::strcmp (ex._rep_id (), this->ex_data_[i].id) == 0) 00055 { 00056 return true; 00057 } 00058 } 00059 return false; 00060 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 63 of file operation_details.cpp. References TAO_OutputCDR::more_fragments(), and num_args_. Referenced by TAO::Remote_Invocation::marshal_data().
00064 { 00065 for (CORBA::ULong i = 0; i != this->num_args_; ++i) 00066 { 00067 if (!((*this->args_[i]).marshal (cdr))) 00068 return false; 00069 } 00070 00071 // Nothing else to fragment. We're also guaranteed to have 00072 // data in the CDR stream since the operation was a marshaling 00073 // operation, not a fragmentation operation. 00074 cdr.more_fragments (false); 00075 00076 return true; 00077 } |
|
Operation name.
Definition at line 34 of file operation_details.inl. References opname_. Referenced by TAO::Collocated_Invocation::invoke(), TAO_GIOP_Message_Generator_Parser_12::write_request_header(), and TAO_GIOP_Message_Generator_Parser_10::write_request_header().
00035 { 00036 return this->opname_; 00037 } |
|
Length of the operation name.
Definition at line 40 of file operation_details.inl. References opname_len_. Referenced by TAO::Collocated_Invocation::invoke(), TAO_GIOP_Message_Generator_Parser_12::write_request_header(), and TAO_GIOP_Message_Generator_Parser_10::write_request_header().
00041 { 00042 return this->opname_len_; 00043 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 232 of file operation_details.inl. References reply_dispatcher_.
00233 { 00234 this->reply_dispatcher_ = rd; 00235 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 226 of file operation_details.inl. References reply_dispatcher_.
00227 { 00228 return this->reply_dispatcher_; 00229 } |
|
Definition at line 82 of file operation_details.inl.
00083 { 00084 return this->reply_service_info_; 00085 } |
|
Definition at line 76 of file operation_details.inl. Referenced by TAO::Invocation_Base::reply_service_context(), reply_service_info(), and reset_reply_service_info().
00077 { 00078 return this->reply_service_info_; 00079 } |
|
Definition at line 94 of file operation_details.inl. References reply_service_context(), and TAO_Service_Context::service_info().
00095 { 00096 return this->reply_service_context ().service_info (); 00097 } |
|
Definition at line 88 of file operation_details.inl. References reply_service_context(), and TAO_Service_Context::service_info(). Referenced by TAO::LocateRequest_Invocation::invoke(), and TAO::Synch_Twoway_Invocation::remote_twoway().
00089 { 00090 return this->reply_service_context ().service_info (); 00091 } |
|
Return the request ID associated with the operation.
Definition at line 117 of file operation_details.inl.
00118 { 00119 return this->request_id_; 00120 } |
|
Cache the request id.
Definition at line 111 of file operation_details.inl. Referenced by TAO_GIOP_Message_Base::generate_locate_request_header(), TAO_IIOP_Transport::generate_request_header(), TAO::LocateRequest_Invocation_Adapter::invoke(), TAO::Invocation_Adapter::invoke_remote_i(), TAO_GIOP_Message_Generator_Parser_12::write_request_header(), and TAO_GIOP_Message_Generator_Parser_10::write_request_header().
00112 { 00113 this->request_id_ = id; 00114 } |
|
Definition at line 58 of file operation_details.inl. References request_service_info_.
00059 { 00060 return this->request_service_info_; 00061 } |
|
Access the TAO_Service_Context.
Definition at line 52 of file operation_details.inl. References request_service_info_. Referenced by TAO::Remote_Invocation::init_target_spec(), TAO::Invocation_Base::request_service_context(), request_service_info(), reset_request_service_info(), and TAO_IIOP_Transport::set_bidir_context_info().
00053 { 00054 return this->request_service_info_; 00055 } |
|
Definition at line 70 of file operation_details.inl. References request_service_context(), and TAO_Service_Context::service_info().
00071 { 00072 return this->request_service_context ().service_info (); 00073 } |
|
Accessors for the service context list.
Definition at line 64 of file operation_details.inl. References request_service_context(), and TAO_Service_Context::service_info(). Referenced by TAO_GIOP_Message_Generator_Parser_12::write_request_header(), and TAO_GIOP_Message_Generator_Parser_10::write_request_header().
00065 { 00066 return this->request_service_context ().service_info (); 00067 } |
|
Definition at line 105 of file operation_details.inl. References reply_service_context(), and TAO_Service_Context::service_info(). Referenced by TAO::Invocation_Adapter::invoke_i().
00106 { 00107 this->reply_service_context ().service_info ().length (0); 00108 } |
|
Reset the contents of the service context lists that we hold.
Definition at line 100 of file operation_details.inl. References request_service_context(), and TAO_Service_Context::service_info(). Referenced by TAO::Invocation_Adapter::invoke_i().
00101 { 00102 this->request_service_context ().service_info ().length (0); 00103 } |
|
Get the response flags.
Definition at line 141 of file operation_details.inl. References response_flags_.
00142 { 00143 return this->response_flags_; 00144 } |
|
Set the response flags.
Definition at line 123 of file operation_details.inl. References response_flags_. Referenced by TAO::Invocation_Adapter::invoke_remote_i(), TAO::Synch_Oneway_Invocation::remote_oneway(), TAO::Invocation_Adapter::set_response_flags(), TAO_GIOP_Message_Generator_Parser_12::write_request_header(), and TAO_GIOP_Message_Generator_Parser_10::write_request_header().
00124 { 00125 this->response_flags_ = flags; 00126 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 182 of file operation_details.inl. References use_stub_args_.
00183 { 00184 this->use_stub_args_ = use_stub_args; 00185 } |
|
Marshals the list of <this->arg_> into the cdr.
Definition at line 176 of file operation_details.inl. References use_stub_args_.
00177 { 00178 return this->use_stub_args_; 00179 } |
|
Declare FW_Server_Request_Wrapper a friend This friendship makes the FW_Server_Request_Wrapper be able to clone the TAO_Operation_Details data member in TAO_ServerRequest. Definition at line 71 of file operation_details.h. |
|
Addressing mode for this request.
Definition at line 200 of file operation_details.h. Referenced by addressing_mode(). |
|
The arguments of this operation. Note that the return value is also an argument Definition at line 206 of file operation_details.h. |
|
The optional collocated arguments converter.
Definition at line 230 of file operation_details.h. Referenced by cac(). |
|
Count of the exceptions that operations can throw.
Definition at line 215 of file operation_details.h. Referenced by corba_exception(), ex_count(), and has_exception(). |
|
The type of exceptions that the operations can throw.
Definition at line 212 of file operation_details.h. Referenced by corba_exception(), ex_data(), and has_exception(). |
|
FT request expiration time (absolute gregorian).
Definition at line 223 of file operation_details.h. |
|
FT request retention id.
Definition at line 226 of file operation_details.h. |
|
Number of arguments including the return value.
Definition at line 209 of file operation_details.h. Referenced by args_num(), argument_flag(), demarshal_args(), and marshal_args(). |
|
Name of the operation being invoked.
Definition at line 180 of file operation_details.h. Referenced by opname(). |
|
Precalculated length of opname_.
Definition at line 183 of file operation_details.h. Referenced by opname_len(). |
|
The optional reply dispatcher.
Definition at line 233 of file operation_details.h. Referenced by reply_dispatcher(). |
|
The ServiceContextList received from the server side. Only valid when sending a request. Definition at line 197 of file operation_details.h. |
|
Request ID of this operation.
Definition at line 186 of file operation_details.h. |
|
The ServiceContextList sent to the server side. Only valid when sending a request. Definition at line 193 of file operation_details.h. Referenced by request_service_context(). |
|
Response flags.
Definition at line 189 of file operation_details.h. Referenced by response_flags(). |
|
Boolean flag to indicate whether in the skeletons the stub arguments stored in these operation details should be used or not. Definition at line 219 of file operation_details.h. Referenced by use_stub_args(). |