#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 () throw (CORBA::SystemException) |
Invocation_Status | receive_reply_interception () throw (CORBA::SystemException) |
Invocation_Status | receive_other_interception () throw (CORBA::SystemException) |
PortableInterceptor::ReplyStatus | handle_any_exception (CORBA::Exception *e) |
PortableInterceptor::ReplyStatus | handle_all_exception () |
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 55 of file Invocation_Base.cpp. References adapter_.
00056 { 00057 #if TAO_HAS_INTERCEPTORS == 1 00058 adapter_ = 0; 00059 #endif /*TAO_HAS_INTERCEPTORS == 1*/ 00060 } |
|
Definition at line 29 of file Invocation_Base.cpp. References CORBA::Object_ptr, and TAO::TAO_INVOKE_START.
00035 : details_ (details) 00036 , forwarded_to_ (0) 00037 , response_expected_ (response_expected) 00038 , otarget_ (ot) 00039 , target_ (t) 00040 , orb_core_ (stub->orb_core ()) 00041 , stub_ (stub) 00042 #if TAO_HAS_INTERCEPTORS == 1 00043 , adapter_ (orb_core_->clientrequestinterceptor_adapter ()) 00044 , stack_size_ (0) 00045 , invoke_status_ (TAO_INVOKE_START) 00046 , caught_exception_ (0) 00047 , is_remote_request_ (request_is_remote) 00048 #endif /*TAO_HAS_INTERCEPTORS == 1*/ 00049 { 00050 #if TAO_HAS_INTERCEPTORS == 0 00051 ACE_UNUSED_ARG (request_is_remote); 00052 #endif /*TAO_HAS_INTERCEPTORS == 0*/ 00053 } |
|
|
|
|
|
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().
00029 { 00030 return CORBA::Object::_duplicate (this->forwarded_to_.in ()); 00031 } |
|
Definition at line 233 of file Invocation_Base.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, adapter_, exception, TAO::ClientRequestInterceptor_Adapter::receive_exception(), TAO::ClientRequestInterceptor_Adapter::reply_status(), and PortableInterceptor::ReplyStatus. Referenced by TAO::Collocated_Invocation::invoke().
00234 { 00235 CORBA::UNKNOWN ex; 00236 this->exception (&ex); 00237 00238 PortableInterceptor::ReplyStatus status = 00239 PortableInterceptor::SYSTEM_EXCEPTION; 00240 00241 if (adapter_ != 0) 00242 { 00243 this->adapter_->receive_exception (*this 00244 ACE_ENV_ARG_PARAMETER); 00245 ACE_CHECK_RETURN (PortableInterceptor::UNKNOWN); 00246 00247 status = 00248 this->adapter_->reply_status (*this); 00249 } 00250 00251 return status; 00252 } |
|
Helper methods to handle interception calls when exceptions are thrown by the PortableInterceptor. Definition at line 211 of file Invocation_Base.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, adapter_, exception, TAO::ClientRequestInterceptor_Adapter::receive_exception(), TAO::ClientRequestInterceptor_Adapter::reply_status(), and PortableInterceptor::ReplyStatus. Referenced by TAO::Collocated_Invocation::invoke().
00213 { 00214 this->exception (ex); 00215 00216 PortableInterceptor::ReplyStatus status = 00217 PortableInterceptor::SYSTEM_EXCEPTION; 00218 00219 if (adapter_ != 0) 00220 { 00221 this->adapter_->receive_exception (*this 00222 ACE_ENV_ARG_PARAMETER); 00223 ACE_CHECK_RETURN (PortableInterceptor::UNKNOWN); 00224 00225 status = 00226 this->adapter_->reply_status (*this); 00227 } 00228 00229 return status; 00230 } |
|
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::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().
00011 { 00012 return this->orb_core_; 00013 } |
|
Helper method to invoke receive_other interception call to all the registered interceptors. Definition at line 171 of file Invocation_Base.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHALL, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO::TAO_INVOKE_FAILURE, TAO::TAO_INVOKE_RESTART, and TAO::TAO_INVOKE_SUCCESS. Referenced by TAO::Collocated_Invocation::invoke().
00173 { 00174 if (adapter_ != 0) 00175 { 00176 ACE_TRY 00177 { 00178 this->adapter_->receive_other (*this 00179 ACE_ENV_ARG_PARAMETER); 00180 ACE_TRY_CHECK; 00181 } 00182 ACE_CATCHANY 00183 { 00184 (void) this->handle_any_exception (&ACE_ANY_EXCEPTION 00185 ACE_ENV_ARG_PARAMETER); 00186 ACE_TRY_CHECK; 00187 00188 ACE_RE_THROW; 00189 } 00190 # if defined (ACE_HAS_EXCEPTIONS) \ 00191 && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) 00192 ACE_CATCHALL 00193 { 00194 (void) this->handle_all_exception (ACE_ENV_SINGLE_ARG_PARAMETER); 00195 ACE_TRY_CHECK; 00196 00197 ACE_RE_THROW; 00198 } 00199 # endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ 00200 ACE_ENDTRY; 00201 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00202 00203 if (this->forwarded_to_.in ()) 00204 return TAO_INVOKE_RESTART; 00205 } 00206 00207 return TAO_INVOKE_SUCCESS; 00208 } |
|
Helper method to invoke receive_reply interception call to all the registered interceptors. Definition at line 126 of file Invocation_Base.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHALL, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, PortableInterceptor::ReplyStatus, TAO::TAO_INVOKE_FAILURE, TAO::TAO_INVOKE_RESTART, and TAO::TAO_INVOKE_SUCCESS. Referenced by TAO::Collocated_Invocation::invoke().
00128 { 00129 if (adapter_ != 0) 00130 { 00131 ACE_TRY 00132 { 00133 this->adapter_->receive_reply (*this 00134 ACE_ENV_ARG_PARAMETER); 00135 ACE_TRY_CHECK; 00136 } 00137 ACE_CATCHANY 00138 { 00139 (void) this->handle_any_exception (&ACE_ANY_EXCEPTION 00140 ACE_ENV_ARG_PARAMETER); 00141 ACE_TRY_CHECK; 00142 00143 ACE_RE_THROW; 00144 } 00145 # if defined (ACE_HAS_EXCEPTIONS) \ 00146 && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) 00147 ACE_CATCHALL 00148 { 00149 (void) this->handle_all_exception (ACE_ENV_SINGLE_ARG_PARAMETER); 00150 ACE_TRY_CHECK; 00151 00152 ACE_RE_THROW; 00153 } 00154 # endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ 00155 ACE_ENDTRY; 00156 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00157 00158 const PortableInterceptor::ReplyStatus status = 00159 this->adapter_->reply_status (*this); 00160 00161 if (status == PortableInterceptor::LOCATION_FORWARD || 00162 status == PortableInterceptor::TRANSPORT_RETRY) 00163 return TAO_INVOKE_RESTART; 00164 } 00165 00166 return TAO_INVOKE_SUCCESS; 00167 } |
|
Mutator to set the reply status of the invocation.
Referenced by TAO::Collocated_Invocation::invoke(), and TAO::Reply_Guard::~Reply_Guard(). |
|
Definition at line 75 of file Invocation_Base.cpp. References details_, and TAO_Operation_Details::reply_service_context().
00076 { 00077 return this->details_.reply_service_context (); 00078 } |
|
Definition at line 266 of file Invocation_Base.cpp. References adapter_, and TAO::ClientRequestInterceptor_Adapter::reply_status(). Referenced by 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 69 of file Invocation_Base.cpp. References details_, and TAO_Operation_Details::request_service_context(). Referenced by TAO::Synch_Twoway_Invocation::check_reply_status().
00070 { 00071 return this->details_.request_service_context (); 00072 } |
|
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 83 of file Invocation_Base.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHALL, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO::TAO_INVOKE_FAILURE, TAO::TAO_INVOKE_RESTART, and TAO::TAO_INVOKE_SUCCESS. Referenced by TAO::Collocated_Invocation::invoke().
00085 { 00086 if (adapter_ != 0) 00087 { 00088 ACE_TRY 00089 { 00090 this->adapter_->send_request (*this 00091 ACE_ENV_ARG_PARAMETER); 00092 ACE_TRY_CHECK; 00093 } 00094 ACE_CATCHANY 00095 { 00096 (void) this->handle_any_exception (&ACE_ANY_EXCEPTION 00097 ACE_ENV_ARG_PARAMETER); 00098 ACE_TRY_CHECK; 00099 00100 // This is a begin interception point 00101 ACE_RE_THROW; 00102 } 00103 # if defined (ACE_HAS_EXCEPTIONS) \ 00104 && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) 00105 ACE_CATCHALL 00106 { 00107 (void) this->handle_all_exception (ACE_ENV_SINGLE_ARG_PARAMETER); 00108 ACE_TRY_CHECK; 00109 00110 // This is a begin interception point 00111 ACE_RE_THROW; 00112 } 00113 # endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ 00114 ACE_ENDTRY; 00115 ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); 00116 00117 if (this->forwarded_to_.in ()) 00118 return TAO_INVOKE_RESTART; 00119 } 00120 00121 // What are the other cases?? 00122 return TAO_INVOKE_SUCCESS; 00123 } |
|
|
|
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::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 225 of file Invocation_Base.h. Referenced by handle_all_exception(), handle_any_exception(), reply_status(), and ~Invocation_Base(). |
|
Pointer to the caught exception.
Definition at line 233 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 255 of file Invocation_Base.cpp. Referenced by handle_all_exception(), and handle_any_exception().
00256 { 00257 if (CORBA::SystemException::_downcast (exception) != 0) 00258 this->invoke_status_ = TAO::TAO_INVOKE_SYSTEM_EXCEPTION; 00259 else if (CORBA::UserException::_downcast (exception) != 0) 00260 this->invoke_status_ = TAO::TAO_INVOKE_USER_EXCEPTION; 00261 00262 this->caught_exception_ = exception; 00263 } |
|
Forwarded object reference.
Definition at line 138 of file Invocation_Base.h. Referenced by forwarded_reference(), is_forwarded(), and steal_forwarded_reference(). |
|
Definition at line 229 of file Invocation_Base.h. |
|
Flag used to distinguish a remote invocation versus a collocated (thru-poa) invocation. Definition at line 237 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 227 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. |