#include <Invocation_Base.h>
Inheritance diagram for TAO::Invocation_Base:
[NOHEADER] | |
size_t & | stack_size (void) |
CORBA::Exception * | caught_exception (void) |
TAO::Invocation_Status | invoke_status (void) const |
Invoke status. | |
PortableInterceptor::ReplyStatus | reply_status (void) const |
bool | is_remote_request () const |
void exception CORBA::Exception * | exception |
Change the exception status. | |
Invocation_Status | send_request_interception (void) |
Invocation_Status | receive_reply_interception (void) |
Invocation_Status | receive_other_interception (void) |
PortableInterceptor::ReplyStatus | handle_any_exception (CORBA::Exception *e) |
PortableInterceptor::ReplyStatus | handle_all_exception (void) |
ClientRequestInterceptor_Adapter * | adapter_ |
The client requestor adapter. | |
size_t | stack_size_ |
TAO::Invocation_Status | invoke_status_ |
CORBA::Exception * | caught_exception_ |
Pointer to the caught exception. | |
bool | is_remote_request_ |
Public Member Functions | |
virtual | ~Invocation_Base (void) |
TAO_ORB_Core * | orb_core (void) const |
TAO_Stub * | stub (void) const |
CORBA::Object_ptr | forwarded_reference (void) |
void | forwarded_reference (CORBA::Object_ptr o) |
TAO_Service_Context & | request_service_context (void) |
Accessors for the service context list. | |
TAO_Service_Context & | reply_service_context (void) |
CORBA::Object_ptr | steal_forwarded_reference (void) |
Return the forwarded object location by loosing ownership. | |
bool | is_forwarded (void) const |
Did the invocation got forwarded to a new location? | |
void | reply_received (Invocation_Status s) |
Mutator to set the reply status of the invocation. | |
CORBA::Object_ptr | effective_target (void) const |
Return the effective target of the invocation. | |
CORBA::Object_ptr | target (void) const |
Return the target object. | |
CORBA::Boolean | response_expected (void) const |
Does this invocation return a response? | |
TAO_Operation_Details & | operation_details (void) |
The operaton details of the invocation. | |
Protected Member Functions | |
Invocation_Base (CORBA::Object_ptr otarget, CORBA::Object_ptr target, TAO_Stub *stub, TAO_Operation_Details &op, bool response_expected, bool request_is_remote) | |
Protected Attributes | |
TAO_Operation_Details & | details_ |
The operation details on which we are operating on. | |
CORBA::Object_var | forwarded_to_ |
Forwarded object reference. | |
bool | response_expected_ |
Is response expected? | |
Private Member Functions | |
Invocation_Base (const Invocation_Base &) | |
Invocation_Base & | operator= (const Invocation_Base &) |
Private Attributes | |
CORBA::Object_ptr | otarget_ |
The original target on which the invocation was started. | |
CORBA::Object_ptr | target_ |
The effective target on which the invocation is on. | |
TAO_ORB_Core * | orb_core_ |
Cache the ORB_Core. | |
TAO_Stub * | stub_ |
The original target on which the invocation was started. |
This class is the base of the invocation object hiererachy. This hierarchy is classified based on the type of invocation and the mode of invocation. One of the objects from the hierarchy is created on the stack for every invocation.
In addition this class encapsulates the essential details that are required for PortableInterceptors to function correctly. Further this class also provides some helper and accessor methods that are used by clients.
Definition at line 58 of file Invocation_Base.h.
|
Definition at line 59 of file Invocation_Base.cpp.
00060 { 00061 #if TAO_HAS_INTERCEPTORS == 1 00062 adapter_ = 0; 00063 #endif /* TAO_HAS_INTERCEPTORS == 1 */ 00064 } |
|
|
|
|
|
|
|
Return the effective target of the invocation. Please see the PortableInterceptor specification in the CORBA spec to understand what effective target means. Definition at line 58 of file Invocation_Base.inl. Referenced by TAO::Collocated_Invocation::invoke().
00059 { 00060 return this->target_; 00061 } |
|
Definition at line 22 of file Invocation_Base.inl. References CORBA::Object::_duplicate(), forwarded_to_, and CORBA::Object_ptr.
00023 { 00024 this->forwarded_to_ = CORBA::Object::_duplicate (o); 00025 } |
|
These access methods have to be public so that the PortableInterceptor can use them Definition at line 28 of file Invocation_Base.inl. References CORBA::Object::_duplicate(). Referenced by TAO::Synch_Twoway_Invocation::location_forward().
00029 { 00030 return CORBA::Object::_duplicate (this->forwarded_to_.in ()); 00031 } |
|
Definition at line 200 of file Invocation_Base.cpp. References exception, and PortableInterceptor::ReplyStatus. Referenced by TAO::Collocated_Invocation::invoke(), receive_other_interception(), receive_reply_interception(), TAO::Synch_Oneway_Invocation::remote_oneway(), TAO::Synch_Twoway_Invocation::remote_twoway(), and send_request_interception().
00201 { 00202 this->exception (&unknown_exception); 00203 00204 PortableInterceptor::ReplyStatus status = 00205 PortableInterceptor::SYSTEM_EXCEPTION; 00206 00207 if (adapter_ != 0) 00208 { 00209 this->adapter_->receive_exception (*this); 00210 00211 status = this->adapter_->reply_status (*this); 00212 } 00213 00214 return status; 00215 } |
|
Helper methods to handle interception calls when exceptions are thrown by the PortableInterceptor. Definition at line 175 of file Invocation_Base.cpp. References exception, forwarded_to_, TAO_Pseudo_Var_T< T >::in(), and PortableInterceptor::ReplyStatus. Referenced by TAO::Collocated_Invocation::invoke(), receive_other_interception(), receive_reply_interception(), TAO::Synch_Oneway_Invocation::remote_oneway(), TAO::Synch_Twoway_Invocation::remote_twoway(), and send_request_interception().
00176 { 00177 this->exception (ex); 00178 00179 PortableInterceptor::ReplyStatus status = 00180 PortableInterceptor::SYSTEM_EXCEPTION; 00181 00182 if (adapter_ != 0) 00183 { 00184 this->adapter_->receive_exception (*this); 00185 00186 if (this->forwarded_to_.in ()) 00187 { 00188 status = PortableInterceptor::LOCATION_FORWARD; 00189 } 00190 else 00191 { 00192 status = this->adapter_->reply_status (*this); 00193 } 00194 } 00195 00196 return status; 00197 } |
|
Invoke status.
|
|
Did the invocation got forwarded to a new location?
Definition at line 40 of file Invocation_Base.inl. References forwarded_to_, and TAO_Pseudo_Var_T< T >::in(). Referenced by TAO::LocateRequest_Invocation_Adapter::invoke(), TAO::Invocation_Adapter::invoke_collocated_i(), TAO::Invocation_Adapter::invoke_oneway(), and TAO::Invocation_Adapter::invoke_twoway().
00041 { 00042 return (this->forwarded_to_.in () != 0); 00043 } |
|
Accessor used to determine if the current invocation is part of a remote request, and if not, it will be considered to be part of a collocated request. |
|
The operaton details of the invocation.
Definition at line 64 of file Invocation_Base.inl. References details_.
00065 { 00066 return this->details_; 00067 } |
|
|
|
Definition at line 10 of file Invocation_Base.inl. Referenced by TAO::Synch_Twoway_Invocation::check_reply_status(), TAO::Synch_Twoway_Invocation::handle_system_exception(), and TAO::Synch_Twoway_Invocation::wait_for_reply().
00011 { 00012 return this->orb_core_; 00013 } |
|
Helper method to invoke receive_other interception call to all the registered interceptors. Definition at line 148 of file Invocation_Base.cpp. References forwarded_to_, handle_all_exception(), handle_any_exception(), TAO_Pseudo_Var_T< T >::in(), TAO::TAO_INVOKE_RESTART, and TAO::TAO_INVOKE_SUCCESS. Referenced by TAO::Collocated_Invocation::invoke(), TAO::Synch_Oneway_Invocation::remote_oneway(), and TAO::Synch_Twoway_Invocation::remote_twoway().
00149 { 00150 if (adapter_ != 0) 00151 { 00152 try 00153 { 00154 this->adapter_->receive_other (*this); 00155 } 00156 catch ( ::CORBA::Exception& ex) 00157 { 00158 (void) this->handle_any_exception (&ex); 00159 throw; 00160 } 00161 catch (...) 00162 { 00163 (void) this->handle_all_exception (); 00164 throw; 00165 } 00166 00167 if (this->forwarded_to_.in ()) 00168 return TAO_INVOKE_RESTART; 00169 } 00170 00171 return TAO_INVOKE_SUCCESS; 00172 } |
|
Helper method to invoke receive_reply interception call to all the registered interceptors. Definition at line 116 of file Invocation_Base.cpp. References handle_all_exception(), handle_any_exception(), PortableInterceptor::ReplyStatus, TAO::TAO_INVOKE_RESTART, and TAO::TAO_INVOKE_SUCCESS. Referenced by TAO::Collocated_Invocation::invoke(), and TAO::Synch_Twoway_Invocation::remote_twoway().
00117 { 00118 if (adapter_ != 0) 00119 { 00120 try 00121 { 00122 this->adapter_->receive_reply (*this); 00123 } 00124 catch ( ::CORBA::Exception& ex) 00125 { 00126 (void) this->handle_any_exception (&ex); 00127 throw; 00128 } 00129 catch (...) 00130 { 00131 (void) this->handle_all_exception (); 00132 throw; 00133 } 00134 00135 PortableInterceptor::ReplyStatus const status = 00136 this->adapter_->reply_status (*this); 00137 00138 if (status == PortableInterceptor::LOCATION_FORWARD || 00139 status == PortableInterceptor::TRANSPORT_RETRY) 00140 return TAO_INVOKE_RESTART; 00141 } 00142 00143 return TAO_INVOKE_SUCCESS; 00144 } |
|
Mutator to set the reply status of the invocation.
Referenced by TAO::Collocated_Invocation::invoke(), and TAO::Reply_Guard::~Reply_Guard(). |
|
Definition at line 79 of file Invocation_Base.cpp. References details_, and TAO_Operation_Details::reply_service_context().
00080 { 00081 return this->details_.reply_service_context (); 00082 } |
|
Definition at line 230 of file Invocation_Base.cpp. Referenced by TAO::LocateRequest_Invocation_Adapter::invoke(), TAO::Invocation_Adapter::invoke_collocated_i(), TAO::Invocation_Adapter::invoke_oneway(), and TAO::Invocation_Adapter::invoke_twoway().
|
|
Accessors for the service context list. The service context lists are actually cached elsewhere. Providing this accessor helps the PI to access this list in both remote and collocated mode. Definition at line 73 of file Invocation_Base.cpp. References details_, and TAO_Operation_Details::request_service_context(). Referenced by TAO::Synch_Twoway_Invocation::check_reply_status().
00074 { 00075 return this->details_.request_service_context (); 00076 } |
|
Does this invocation return a response?
Definition at line 46 of file Invocation_Base.inl. References response_expected_. Referenced by TAO::Collocated_Invocation::invoke().
00047 { 00048 return this->response_expected_; 00049 } |
|
Helper method to invoke send_request interception call to all the registered interceptors. Definition at line 87 of file Invocation_Base.cpp. References forwarded_to_, handle_all_exception(), handle_any_exception(), TAO_Pseudo_Var_T< T >::in(), TAO::TAO_INVOKE_RESTART, and TAO::TAO_INVOKE_SUCCESS. Referenced by TAO::Collocated_Invocation::invoke(), TAO::Synch_Oneway_Invocation::remote_oneway(), and TAO::Synch_Twoway_Invocation::remote_twoway().
00088 { 00089 if (adapter_ != 0) 00090 { 00091 try 00092 { 00093 // This is a begin interception point 00094 this->adapter_->send_request (*this); 00095 } 00096 catch ( ::CORBA::Exception& ex) 00097 { 00098 (void) this->handle_any_exception (&ex); 00099 throw; 00100 } 00101 catch (...) 00102 { 00103 (void) this->handle_all_exception (); 00104 throw; 00105 } 00106 00107 if (this->forwarded_to_.in ()) 00108 return TAO_INVOKE_RESTART; 00109 } 00110 00111 // What are the other cases?? 00112 return TAO_INVOKE_SUCCESS; 00113 } |
|
|
|
Return the forwarded object location by loosing ownership.
Definition at line 34 of file Invocation_Base.inl. References TAO_Pseudo_Var_T< T >::_retn(), and forwarded_to_. Referenced by TAO::LocateRequest_Invocation_Adapter::invoke(), TAO::Invocation_Adapter::invoke_collocated_i(), TAO::Invocation_Adapter::invoke_oneway(), and TAO::Invocation_Adapter::invoke_twoway().
00035 { 00036 return this->forwarded_to_._retn (); 00037 } |
|
Definition at line 16 of file Invocation_Base.inl.
00017 { 00018 return this->stub_; 00019 } |
|
Return the target object.
Definition at line 52 of file Invocation_Base.inl. References otarget_.
00053 { 00054 return this->otarget_; 00055 } |
|
The client requestor adapter.
Definition at line 220 of file Invocation_Base.h. |
|
Pointer to the caught exception.
Definition at line 228 of file Invocation_Base.h. |
|
The operation details on which we are operating on.
Definition at line 135 of file Invocation_Base.h. Referenced by operation_details(), reply_service_context(), and request_service_context(). |
|
Change the exception status.
Definition at line 218 of file Invocation_Base.cpp. Referenced by handle_all_exception(), and handle_any_exception().
00219 { 00220 if (CORBA::SystemException::_downcast (exception) != 0) 00221 this->invoke_status_ = TAO::TAO_INVOKE_SYSTEM_EXCEPTION; 00222 else if (CORBA::UserException::_downcast (exception) != 0) 00223 this->invoke_status_ = TAO::TAO_INVOKE_USER_EXCEPTION; 00224 00225 this->forwarded_to_ = CORBA::Object::_nil (); 00226 this->caught_exception_ = exception; 00227 } |
|
Forwarded object reference.
Definition at line 138 of file Invocation_Base.h. Referenced by forwarded_reference(), handle_any_exception(), is_forwarded(), receive_other_interception(), send_request_interception(), and steal_forwarded_reference(). |
|
Definition at line 224 of file Invocation_Base.h. |
|
Flag used to distinguish a remote invocation versus a collocated (thru-poa) invocation. Definition at line 232 of file Invocation_Base.h. |
|
Cache the ORB_Core.
Definition at line 163 of file Invocation_Base.h. |
|
The original target on which the invocation was started. The following object reference pointers are *not* duplicated. They are cached for portable interceptors, and they just live for the lifetime of the request. Hence there is no point in duplicating the pointers. Definition at line 157 of file Invocation_Base.h. Referenced by target(). |
|
Is response expected?
Definition at line 141 of file Invocation_Base.h. Referenced by response_expected(). |
|
Definition at line 222 of file Invocation_Base.h. |
|
The original target on which the invocation was started. The following object reference pointers are *not* duplicated. They are cached for portable interceptors, and they just live for the lifetime of the request. Hence there is no point in duplicating the pointers. Definition at line 165 of file Invocation_Base.h. |
|
The effective target on which the invocation is on.
Definition at line 160 of file Invocation_Base.h. |