Class with operation details. More...
#include <operation_details.h>
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 |
Helper methods used by the Invocation classes. | |
| |
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. | |
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 |
Name of the operation being invoked. | |
CORBA::ULong | ex_count (void) const |
Exception count. | |
TAO::Exception_Data const * | ex_data (void) const |
Name of the operation being invoked. | |
CORBA::Boolean | use_stub_args (void) const |
Name of the operation being invoked. | |
void | use_stub_args (CORBA::Boolean use_stub_arguments) |
Name of the operation being invoked. | |
void | ft_expiration_time (TimeBase::TimeT time) |
Name of the operation being invoked. | |
TimeBase::TimeT | ft_expiration_time (void) const |
Name of the operation being invoked. | |
void | ft_retention_id (CORBA::Long request_id) |
Name of the operation being invoked. | |
CORBA::Long | ft_retention_id (void) const |
Name of the operation being invoked. | |
TAO::Collocated_Arguments_Converter * | cac (void) const |
Accessor for cac_ pointer. | |
void | cac (TAO::Collocated_Arguments_Converter *cac) |
Name of the operation being invoked. | |
TAO_Reply_Dispatcher * | reply_dispatcher (void) const |
Name of the operation being invoked. | |
void | reply_dispatcher (TAO_Reply_Dispatcher *rd) |
Name of the operation being invoked. |
Class with operation details.
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_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.
: opname_ (name) , opname_len_ (len) , request_id_ (0) , response_flags_ (0) , addressing_mode_ (TAO_Target_Specification::Key_Addr) , args_ (args) , num_args_ (num) , ex_data_ (data) , ex_count_ (count) , use_stub_args_ (args ? true : false) #if TAO_HAS_INTERCEPTORS == 1 , ft_expiration_time_ (0) , ft_retention_id_ (0) #endif /*TAO_HAS_INTERCEPTORS == 1*/ , cac_ (0) , reply_dispatcher_ (0) { }
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.
{ return this->addressing_mode_; }
void TAO_Operation_Details::addressing_mode | ( | CORBA::Short | addr | ) |
Set method for the addressing mode.
Definition at line 153 of file operation_details.inl.
{ if (mode == 0) this->addressing_mode_ = TAO_Target_Specification::Key_Addr; else if (mode == 1) this->addressing_mode_ = TAO_Target_Specification::Profile_Addr; else if (mode == 2) this->addressing_mode_ = TAO_Target_Specification::Reference_Addr; }
TAO::Argument ** TAO_Operation_Details::args | ( | void | ) | const |
Accessors for the argument list.
Definition at line 164 of file operation_details.inl.
{ return this->args_; }
CORBA::ULong TAO_Operation_Details::args_num | ( | void | ) | const |
Name of the operation being invoked.
Definition at line 170 of file operation_details.inl.
{ return this->num_args_; }
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.
{ return (this->num_args_ > 1); }
TAO::Collocated_Arguments_Converter * TAO_Operation_Details::cac | ( | void | ) | const |
Accessor for cac_ pointer.
Definition at line 214 of file operation_details.inl.
{ return this->cac_; }
void TAO_Operation_Details::cac | ( | TAO::Collocated_Arguments_Converter * | cac | ) |
Name of the operation being invoked.
Definition at line 220 of file operation_details.inl.
{ this->cac_ = cac; }
CORBA::Exception * TAO_Operation_Details::corba_exception | ( | const char * | ex | ) | const |
Creates and returns a CORBA::Exception object whose repository id ex matches the exception list that this operation specified. 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 25 of file operation_details.cpp.
{ for (CORBA::ULong i = 0; i != this->ex_count_; ++i) { if (ACE_OS::strcmp (id, this->ex_data_[i].id) != 0) { continue; } // Create an exception object CORBA::Exception *exception = this->ex_data_[i].alloc (); if (exception == 0) { throw ::CORBA::NO_MEMORY (0, CORBA::COMPLETED_YES); } // Return the exception object that we just created. return exception; } // If there are no matches return an unknown exception. throw ::CORBA::UNKNOWN (0, CORBA::COMPLETED_YES); }
bool TAO_Operation_Details::demarshal_args | ( | TAO_InputCDR & | cdr | ) |
Demarshals the list of <this->arg_> into the cdr.
Definition at line 91 of file operation_details.cpp.
{ try { for (CORBA::ULong i = 0; i != this->num_args_; ++i) { if (!((*this->args_[i]).demarshal (cdr))) return false; } cdr.reset_vt_indirect_maps (); } catch (...) { cdr.reset_vt_indirect_maps (); throw; } return true; }
CORBA::ULong TAO_Operation_Details::ex_count | ( | void | ) | const |
TAO::Exception_Data const * TAO_Operation_Details::ex_data | ( | void | ) | const |
Name of the operation being invoked.
Definition at line 135 of file operation_details.inl.
{ return this->ex_data_; }
void TAO_Operation_Details::ft_expiration_time | ( | TimeBase::TimeT | time | ) |
Name of the operation being invoked.
TimeBase::TimeT TAO_Operation_Details::ft_expiration_time | ( | void | ) | const |
Name of the operation being invoked.
CORBA::Long TAO_Operation_Details::ft_retention_id | ( | void | ) | const |
Name of the operation being invoked.
void TAO_Operation_Details::ft_retention_id | ( | CORBA::Long | request_id | ) |
Name of the operation being invoked.
bool TAO_Operation_Details::has_exception | ( | ::CORBA::Exception & | ex | ) | const |
Check whether exception ex is in the signature of this operation.
Definition at line 51 of file operation_details.cpp.
{ for (CORBA::ULong i = 0; i != this->ex_count_; ++i) { if (ACE_OS::strcmp (ex._rep_id (), this->ex_data_[i].id) == 0) { return true; } } return false; }
bool TAO_Operation_Details::marshal_args | ( | TAO_OutputCDR & | cdr | ) |
Marshals the list of <this->arg_> into the cdr.
Definition at line 64 of file operation_details.cpp.
{ try { for (CORBA::ULong i = 0; i != this->num_args_; ++i) { if (!((*this->args_[i]).marshal (cdr))) return false; } // Nothing else to fragment. We're also guaranteed to have // data in the CDR stream since the operation was a marshaling // operation, not a fragmentation operation. cdr.more_fragments (false); #ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION cdr.reset_vt_indirect_maps (); #endif } catch (...) { #ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION cdr.reset_vt_indirect_maps (); #endif throw; } return true; }
const char * TAO_Operation_Details::opname | ( | void | ) | const |
CORBA::ULong TAO_Operation_Details::opname_len | ( | void | ) | const |
Length of the operation name.
Definition at line 40 of file operation_details.inl.
{ return this->opname_len_; }
TAO_Reply_Dispatcher * TAO_Operation_Details::reply_dispatcher | ( | void | ) | const |
Name of the operation being invoked.
Definition at line 226 of file operation_details.inl.
{ return this->reply_dispatcher_; }
void TAO_Operation_Details::reply_dispatcher | ( | TAO_Reply_Dispatcher * | rd | ) |
Name of the operation being invoked.
Definition at line 232 of file operation_details.inl.
{ this->reply_dispatcher_ = rd; }
TAO_Service_Context & TAO_Operation_Details::reply_service_context | ( | void | ) |
Definition at line 76 of file operation_details.inl.
{ return this->reply_service_info_; }
const TAO_Service_Context & TAO_Operation_Details::reply_service_context | ( | void | ) | const |
Definition at line 82 of file operation_details.inl.
{ return this->reply_service_info_; }
IOP::ServiceContextList & TAO_Operation_Details::reply_service_info | ( | void | ) |
Definition at line 88 of file operation_details.inl.
{ return this->reply_service_context ().service_info (); }
const IOP::ServiceContextList & TAO_Operation_Details::reply_service_info | ( | void | ) | const |
Definition at line 94 of file operation_details.inl.
{ return this->reply_service_context ().service_info (); }
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.
{ return this->request_id_; }
void TAO_Operation_Details::request_id | ( | CORBA::ULong | id | ) |
Cache the request id.
Definition at line 111 of file operation_details.inl.
{ this->request_id_ = id; }
TAO_Service_Context & TAO_Operation_Details::request_service_context | ( | void | ) |
Access the TAO_Service_Context.
Definition at line 52 of file operation_details.inl.
{ return this->request_service_info_; }
const TAO_Service_Context & TAO_Operation_Details::request_service_context | ( | void | ) | const |
Definition at line 58 of file operation_details.inl.
{ return this->request_service_info_; }
IOP::ServiceContextList & TAO_Operation_Details::request_service_info | ( | void | ) |
Accessors for the service context list.
Definition at line 64 of file operation_details.inl.
{ return this->request_service_context ().service_info (); }
const IOP::ServiceContextList & TAO_Operation_Details::request_service_info | ( | void | ) | const |
Definition at line 70 of file operation_details.inl.
{ return this->request_service_context ().service_info (); }
void TAO_Operation_Details::reset_reply_service_info | ( | void | ) |
Definition at line 105 of file operation_details.inl.
{ this->reply_service_context ().service_info ().length (0); }
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.
{ this->request_service_context ().service_info ().length (0); }
void TAO_Operation_Details::response_flags | ( | CORBA::Octet | flags | ) |
Set the response flags.
Definition at line 123 of file operation_details.inl.
{ this->response_flags_ = flags; }
CORBA::Octet TAO_Operation_Details::response_flags | ( | void | ) | const |
Get the response flags.
Definition at line 141 of file operation_details.inl.
{ return this->response_flags_; }
CORBA::Boolean TAO_Operation_Details::use_stub_args | ( | void | ) | const |
Name of the operation being invoked.
Definition at line 176 of file operation_details.inl.
{ return this->use_stub_args_; }
void TAO_Operation_Details::use_stub_args | ( | CORBA::Boolean | use_stub_arguments | ) |
Name of the operation being invoked.
Definition at line 182 of file operation_details.inl.
{ this->use_stub_args_ = use_stub_args; }
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.
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.
TAO::Collocated_Arguments_Converter* TAO_Operation_Details::cac_ [private] |
The optional collocated arguments converter.
Definition at line 231 of file operation_details.h.
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.
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.
FT request expiration time (absolute gregorian).
Definition at line 224 of file operation_details.h.
FT request retention id.
Definition at line 227 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.
const char* TAO_Operation_Details::opname_ [private] |
Name of the operation being invoked.
Definition at line 181 of file operation_details.h.
Precalculated length of opname_.
Definition at line 184 of file operation_details.h.
The optional reply dispatcher.
Definition at line 234 of file operation_details.h.
The ServiceContextList received from the server side. Only valid when sending a request.
Definition at line 198 of file operation_details.h.
Request ID of this operation.
Definition at line 187 of file operation_details.h.
The ServiceContextList sent to the server side. Only valid when sending a request.
Definition at line 194 of file operation_details.h.
Response flags.
Definition at line 190 of file operation_details.h.
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.