#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 65 of file operation_details.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_Operation_Details::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.
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 }
ACE_INLINE void TAO_Operation_Details::addressing_mode | ( | CORBA::Short | addr | ) |
Set method for the addressing mode.
Definition at line 153 of file operation_details.inl.
References addressing_mode_, TAO_Target_Specification::Key_Addr, TAO_Target_Specification::Profile_Addr, and TAO_Target_Specification::Reference_Addr.
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 }
ACE_INLINE TAO_Target_Specification::TAO_Target_Address TAO_Operation_Details::addressing_mode | ( | void | ) | const |
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 }
ACE_INLINE TAO::Argument ** TAO_Operation_Details::args | ( | void | ) | const |
Accessors for the argument list.
Definition at line 164 of file operation_details.inl.
References args_.
Referenced by TAO::Collocated_Invocation::invoke().
00165 { 00166 return this->args_; 00167 }
ACE_INLINE CORBA::ULong TAO_Operation_Details::args_num | ( | void | ) | const |
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 }
ACE_INLINE CORBA::Boolean TAO_Operation_Details::argument_flag | ( | void | ) | const |
Return the flag that indicates whether the operation has any arguments
Definition at line 46 of file operation_details.inl.
ACE_INLINE void TAO_Operation_Details::cac | ( | TAO::Collocated_Arguments_Converter * | cac | ) |
Marshals the list of <this->arg_> into the cdr.
Definition at line 220 of file operation_details.inl.
References cac_.
ACE_INLINE TAO::Collocated_Arguments_Converter * TAO_Operation_Details::cac | ( | void | ) | const |
Accessor for cac_ pointer.
Definition at line 214 of file operation_details.inl.
References cac_.
00215 { 00216 return this->cac_; 00217 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Exception * TAO_Operation_Details::corba_exception | ( | const char * | ex | ) | const |
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 CORBA::COMPLETED_YES, 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 }
bool TAO_Operation_Details::demarshal_args | ( | TAO_InputCDR & | cdr | ) |
Demarshals the list of <this->arg_> into the cdr.
Definition at line 80 of file operation_details.cpp.
References num_args_.
00081 { 00082 for (CORBA::ULong i = 0; i != this->num_args_; ++i) 00083 { 00084 if (!((*this->args_[i]).demarshal (cdr))) 00085 return false; 00086 } 00087 00088 return true; 00089 }
ACE_INLINE CORBA::ULong TAO_Operation_Details::ex_count | ( | void | ) | const |
Exception count.
Definition at line 129 of file operation_details.inl.
References ex_count_.
00130 { 00131 return this->ex_count_; 00132 }
ACE_INLINE TAO::Exception_Data const * TAO_Operation_Details::ex_data | ( | void | ) | const |
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 }
TimeBase::TimeT TAO_Operation_Details::ft_expiration_time | ( | void | ) | const |
Marshals the list of <this->arg_> into the cdr.
void TAO_Operation_Details::ft_expiration_time | ( | TimeBase::TimeT | time | ) |
Marshals the list of <this->arg_> into the cdr.
CORBA::Long TAO_Operation_Details::ft_retention_id | ( | void | ) | const |
Marshals the list of <this->arg_> into the cdr.
void TAO_Operation_Details::ft_retention_id | ( | CORBA::Long | request_id | ) |
Marshals the list of <this->arg_> into the cdr.
bool TAO_Operation_Details::has_exception | ( | ::CORBA::Exception & | ex | ) | const |
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_, and ACE_OS::strcmp().
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 }
bool TAO_Operation_Details::marshal_args | ( | TAO_OutputCDR & | cdr | ) |
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_.
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 }
ACE_INLINE const char * TAO_Operation_Details::opname | ( | void | ) | const |
Operation name.
Definition at line 34 of file operation_details.inl.
References opname_.
Referenced by TAO::Collocated_Invocation::invoke().
00035 { 00036 return this->opname_; 00037 }
ACE_INLINE CORBA::ULong TAO_Operation_Details::opname_len | ( | void | ) | const |
Length of the operation name.
Definition at line 40 of file operation_details.inl.
References opname_len_.
Referenced by TAO::Collocated_Invocation::invoke().
00041 { 00042 return this->opname_len_; 00043 }
ACE_INLINE void TAO_Operation_Details::reply_dispatcher | ( | TAO_Reply_Dispatcher * | rd | ) |
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 }
ACE_INLINE TAO_Reply_Dispatcher * TAO_Operation_Details::reply_dispatcher | ( | void | ) | const |
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 }
ACE_INLINE const TAO_Service_Context & TAO_Operation_Details::reply_service_context | ( | void | ) | const |
Definition at line 82 of file operation_details.inl.
References reply_service_info_.
00083 { 00084 return this->reply_service_info_; 00085 }
ACE_INLINE TAO_Service_Context & TAO_Operation_Details::reply_service_context | ( | void | ) |
Definition at line 76 of file operation_details.inl.
References reply_service_info_.
Referenced by TAO::Invocation_Base::reply_service_context(), reply_service_info(), and reset_reply_service_info().
00077 { 00078 return this->reply_service_info_; 00079 }
ACE_INLINE const IOP::ServiceContextList & TAO_Operation_Details::reply_service_info | ( | void | ) | const |
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 }
ACE_INLINE IOP::ServiceContextList & TAO_Operation_Details::reply_service_info | ( | void | ) |
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 }
ACE_INLINE CORBA::ULong TAO_Operation_Details::request_id | ( | void | ) | const |
Return the request ID associated with the operation.
Definition at line 117 of file operation_details.inl.
References request_id_.
00118 { 00119 return this->request_id_; 00120 }
ACE_INLINE void TAO_Operation_Details::request_id | ( | CORBA::ULong | id | ) |
Cache the request id.
Definition at line 111 of file operation_details.inl.
References request_id_.
Referenced by TAO_GIOP_Message_Base::generate_locate_request_header(), TAO_IIOP_Transport::generate_request_header(), TAO::LocateRequest_Invocation_Adapter::invoke(), and TAO::Invocation_Adapter::invoke_remote_i().
00112 { 00113 this->request_id_ = id; 00114 }
ACE_INLINE const TAO_Service_Context & TAO_Operation_Details::request_service_context | ( | void | ) | const |
Definition at line 58 of file operation_details.inl.
References request_service_info_.
00059 { 00060 return this->request_service_info_; 00061 }
ACE_INLINE TAO_Service_Context & TAO_Operation_Details::request_service_context | ( | void | ) |
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 }
ACE_INLINE const IOP::ServiceContextList & TAO_Operation_Details::request_service_info | ( | void | ) | const |
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 }
ACE_INLINE IOP::ServiceContextList & TAO_Operation_Details::request_service_info | ( | void | ) |
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().
00065 { 00066 return this->request_service_context ().service_info (); 00067 }
ACE_INLINE void TAO_Operation_Details::reset_reply_service_info | ( | void | ) |
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 }
ACE_INLINE void TAO_Operation_Details::reset_request_service_info | ( | void | ) |
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 }
ACE_INLINE CORBA::Octet TAO_Operation_Details::response_flags | ( | void | ) | const |
Get the response flags.
Definition at line 141 of file operation_details.inl.
References response_flags_.
00142 { 00143 return this->response_flags_; 00144 }
ACE_INLINE void TAO_Operation_Details::response_flags | ( | CORBA::Octet | flags | ) |
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(), and TAO::Invocation_Adapter::set_response_flags().
00124 { 00125 this->response_flags_ = flags; 00126 }
ACE_INLINE void TAO_Operation_Details::use_stub_args | ( | CORBA::Boolean | use_stub_arguments | ) |
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 }
ACE_INLINE CORBA::Boolean TAO_Operation_Details::use_stub_args | ( | void | ) | const |
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 }
friend class TAO::CSD::FW_Server_Request_Wrapper [friend] |
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 72 of file operation_details.h.
Addressing mode for this request.
Definition at line 201 of file operation_details.h.
Referenced by addressing_mode().
TAO::Argument** TAO_Operation_Details::args_ [private] |
The arguments of this operation. Note that the return value is also an argument
Definition at line 207 of file operation_details.h.
Referenced by args().
TAO::Collocated_Arguments_Converter* TAO_Operation_Details::cac_ [private] |
The optional collocated arguments converter.
Definition at line 231 of file operation_details.h.
Referenced by cac().
CORBA::ULong TAO_Operation_Details::ex_count_ [private] |
Count of the exceptions that operations can throw.
Definition at line 216 of file operation_details.h.
Referenced by ex_count(), and has_exception().
TAO::Exception_Data* TAO_Operation_Details::ex_data_ [private] |
The type of exceptions that the operations can throw.
Definition at line 213 of file operation_details.h.
Referenced by ex_data(), and has_exception().
TimeBase::TimeT TAO_Operation_Details::ft_expiration_time_ [private] |
FT request expiration time (absolute gregorian).
Definition at line 224 of file operation_details.h.
CORBA::ULong TAO_Operation_Details::num_args_ [private] |
Number of arguments including the return value.
Definition at line 210 of file operation_details.h.
Referenced by args_num(), demarshal_args(), and marshal_args().
const char* TAO_Operation_Details::opname_ [private] |
Name of the operation being invoked.
Definition at line 181 of file operation_details.h.
Referenced by opname().
Precalculated length of opname_.
Definition at line 184 of file operation_details.h.
Referenced by opname_len().
The optional reply dispatcher.
Definition at line 234 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 198 of file operation_details.h.
Referenced by reply_service_context().
Request ID of this operation.
Definition at line 187 of file operation_details.h.
Referenced by request_id().
The ServiceContextList sent to the server side. Only valid when sending a request.
Definition at line 194 of file operation_details.h.
Referenced by request_service_context().
Boolean flag to indicate whether in the skeletons the stub arguments stored in these operation details should be used or not.
Definition at line 220 of file operation_details.h.
Referenced by use_stub_args().