Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# TAO_GIOP_Invocation Class Reference

Encapsulates common behavior for both oneway and twoway invocations. More...

`#include <Invocation.h>`

Inheritance diagram for TAO_GIOP_Invocation:

[legend]
Collaboration diagram for TAO_GIOP_Invocation:

[legend]
List of all members.

## Public Methods
| TAO_GIOP_Invocation (void)
| Default constructor. This should never get called, it is here only to appease older versions of g++. More...
| TAO_GIOP_Invocation (TAO_Stub *data, const char *operation, CORBA::ULong opname_len, CORBA::Boolean argument_flag, TAO_ORB_Core *orb_core, int byte_order=TAO_ENCAP_BYTE_ORDER)
| Constructor. More...
virtual | ~TAO_GIOP_Invocation (void)
void | prepare_header (CORBA::Octet response_flags ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
TAO_Service_Context & | request_service_context (void)
| Accessor to the request ServiceContextList. Only valid when sending a request message. More...
TAO_Service_Context & | reply_service_context (void)
| Accessor to the reply ServiceContextList. Only valid when after receiving a reply message. More...
CORBA::ULong | request_id (void) const
| Return the request id of this invocation. More...
const char * | operation (void)
| Return the name of the operation being invoked. More...
TAO_OutputCDR & | out_stream (void)
| Return the underlying output stream. More...
void | restart_flag (CORBA::Boolean flag)
| Set the value for the restart flag. More...
int | close_connection (void)
| Resets the forwarding profile and behaves like we are fowarded (to the same server). More...
void | start (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
| Establishes a connection to the remote server, initializes the GIOP headers in the output CDR. More...
int | perform_call (TAO_Transport_Descriptor_Interface &desc ACE_ENV_ARG_DECL)
| Called by the invocation endpoint selector for each selected endpoint. More...
void | init_inconsistent_policies (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
  | Dynamically allocate Parameters:
  inconsistent_policies_ | PolicyList.
More...
CORBA::PolicyList * | get_inconsistent_policies (void)
  | Return PolicyList stored in Parameters:
  inconsistent_policies_ | and give up its ownership. User must deallocate memory.
More...
int | location_forward (CORBA::Object_ptr forward ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
CORBA::Object_ptr | forward_reference (void)
| Return the object reference returned in the LOCATION_FORWARD reply. The return reference is only valid if the reply status for the current reply is TAO_INVOKE_RESTART. More...
CORBA::Boolean | received_location_forward (void) const
| Returns true if a location forward was. More...
TAO_Stub * | stub (void)
| Accessor for the stub associated with this invocation. More...
TAO_Transport *& | transport (void)
| Return the TAO_Transport in use for the current Invocation object. More...
CORBA::PolicyList_var & | inconsistent_policies ()
| Accessor for the stub associated with this invocation. More...
TAO_Endpoint * | endpoint (void)
| Endpoint Accessor. More...
void | endpoint (TAO_Endpoint *ep)
TAO_Profile * | profile (void)
| Profile Accessor. More...
void | profile (TAO_Profile *p)
| Profile Accessor. More...
TAO_ORB_Core * | orb_core (void)
| ORB_Core Accessor. More...
ACE_Time_Value * | max_wait_time (void)
| Return the current timeout value for the current invocation. More...
CORBA::ULong & | profile_index (void)
## Protected Methods
int | invoke (CORBA::Boolean is_synchronous ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
| Sends the request, does not wait for the response. More...
int | location_forward (TAO_InputCDR &inp_stream ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
void | location_forward_i (TAO_Stub *stubobj ACE_ENV_ARG_DECL) throw (CORBA::SystemException)
## Protected Attributes
TAO_Stub * | stub_
| The object on which this invocation is going. More...
char | buffer_ [ACE_CDR::DEFAULT_BUFSIZE]
| Buffer used for both the output and input CDR streams, this is "safe" because we only one of the streams at a time. More...
TAO_Operation_Details | op_details_
| The relevant operation detail. More...
TAO_Target_Specification | target_spec_
TAO_OutputCDR | out_stream_
| Stream into which the response is placed. More...
TAO_ORB_Core * | orb_core_
| The orb_core context where we make this invocation. More...
TAO_Transport * | transport_
| This invocation is using this transport. Note: may change... More...
TAO_Invocation_Endpoint_Selector * | endpoint_selector_
| Strategy for making decisions about which endpoint/profile to use for invocation. More...
CORBA::PolicyList_var | inconsistent_policies_
TAO_Profile * | profile_
| This invocation is using this profile. More...
TAO_Endpoint * | endpoint_
  | This invocation is using this endpoint from Parameters:
  profile_. |
More...
ACE_Countdown_Time * | countdown_
| Keep track of the remaining time for this invocation. More...
CORBA::Boolean | restart_flag_
CORBA::Object_var | forward_reference_
CORBA::Boolean | received_location_forward_
| Flag is true when a LOCATION_FORWARD reply is received. More...
CORBA::ULong | profile_index_
| Keep the position of the profile that should be used in performing the invocation. More...
ACE_Time_Value | max_wait_time_value_
ACE_Time_Value * | max_wait_time_

## Detailed Description

Encapsulates common behavior for both oneway and twoway invocations.

This class connects (or lookups a connection from the cache) to the remote server, builds the CDR stream for the Request, send the CDR stream and expects the response and interprets the incoming CDR stream.

## Constructor & Destructor Documentation

TAO_GIOP_Invocation::TAO_GIOP_Invocation | ( | void |  | ) |

| Default constructor. This should never get called, it is here only to appease older versions of g++.

TAO_GIOP_Invocation::TAO_GIOP_Invocation | ( | TAO_Stub * | stub,
|  | const char * | operation,
|  | CORBA::ULong | opname_len,
|  | CORBA::Boolean | argument_flag,
|  | TAO_ORB_Core * | orb_core,
|  | int | byte_order = TAO_ENCAP_BYTE_ORDER
| ) |

| Constructor.

TAO_GIOP_Invocation::~TAO_GIOP_Invocation | ( | void |  | ) | `[virtual]`

| This destructor is virtual so that the derived synchronous invocation classes can call <idle> method on the <Transport>, if they want to. All the synchronous invocations <idle> the Transport, but asynchronous invocations do not do that.

## Member Function Documentation

int TAO_GIOP_Invocation::close_connection | ( | void |  | ) |

| Resets the forwarding profile and behaves like we are fowarded (to the same server).

ACE_INLINE void TAO_GIOP_Invocation::endpoint | ( | TAO_Endpoint * | ep | ) |

ACE_INLINE TAO_Endpoint * TAO_GIOP_Invocation::endpoint | ( | void |  | ) |

| Endpoint Accessor.

ACE_INLINE CORBA::Object_ptr TAO_GIOP_Invocation::forward_reference | ( | void |  | ) |

| Return the object reference returned in the LOCATION_FORWARD reply. The return reference is only valid if the reply status for the current reply is TAO_INVOKE_RESTART.

ACE_INLINE CORBA::PolicyList * TAO_GIOP_Invocation::get_inconsistent_policies | ( | void |  | ) |

  | Return PolicyList stored in Parameters:
  inconsistent_policies_ | and give up its ownership. User must deallocate memory.

ACE_INLINE CORBA::PolicyList_var & TAO_GIOP_Invocation::inconsistent_policies | ( | void |  | ) |

| Accessor for the stub associated with this invocation.

ACE_INLINE void TAO_GIOP_Invocation::init_inconsistent_policies | ( | ACE_ENV_SINGLE_ARG_DECL |  | ) | throw (CORBA::SystemException)

  | Dynamically allocate Parameters:
  inconsistent_policies_ | PolicyList.

int TAO_GIOP_Invocation::invoke | ( | CORBA::Boolean is_synchronous | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException)`[protected]`

  | Sends the request, does not wait for the response. Returns TAO_INVOKE_RESTART if the write call failed and the request must be re-attempted. Parameters:
  is_synchronous | If set invoke() does not return until the message is completely delivered to the underlying transport mechanism, or an error is detected.
Notice that the same profile is tried again because it may be that the server closed the connection simply to release resources.

int TAO_GIOP_Invocation::location_forward | ( | TAO_InputCDR &inp_stream | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException)`[protected]`

| Helper method, the response for a Request or LocateRequest was a LOCATION_FORWARD or TAO_GIOP_OBJECT_FORWARD. In any case we must demarshal the object reference and setup the profiles. The returned forward object reference can be retrieved by invoking the forward_reference() method in this class. It returns TAO_INVOKE_RESTART unless an exception is raised.

int TAO_GIOP_Invocation::location_forward | ( | CORBA::Object_ptr forward | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException)

| Add the given object reference to the list of forward profiles. This basically emulates a LOCATION_FORWARD reply from the server. It is needed by such things as the PortableInterceptor::ForwardRequest exception. The forward object reference can be retrieved by invoking the forward_reference() method in this class. It returns TAO_INVOKE_RESTART unless an exception is raised.

void TAO_GIOP_Invocation::location_forward_i | ( | TAO_Stub *stubobj | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException)`[protected]`

| Helper method that factors out code common to the location_forward() above, and adds the given object reference to the list of a forward profiles. The forward object reference can be retrieved by invoking the forward_reference() method in this class.

ACE_INLINE ACE_Time_Value * TAO_GIOP_Invocation::max_wait_time | ( | void |  | ) |

| Return the current timeout value for the current invocation.

ACE_INLINE const char * TAO_GIOP_Invocation::operation | ( | void |  | ) |

| Return the name of the operation being invoked.

ACE_INLINE TAO_ORB_Core * TAO_GIOP_Invocation::orb_core | ( | void |  | ) |

| ORB_Core Accessor.

ACE_INLINE TAO_OutputCDR & TAO_GIOP_Invocation::out_stream | ( | void |  | ) |

| Return the underlying output stream.

int TAO_GIOP_Invocation::perform_call | ( | TAO_Transport_Descriptor_Interface &desc | ACE_ENV_ARG_DECL | ) |

| Called by the invocation endpoint selector for each selected endpoint.

void TAO_GIOP_Invocation::prepare_header | ( | CORBA::Octet response_flags | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException)

| Initialize the Request header. The <message_size> field of the GIOP header is left blank and must be filled later. The function only returns once a connection has been succesfully established *OR* all profiles have been tried. In that case it raises the CORBA::TRANSIENT exception.

ACE_INLINE void TAO_GIOP_Invocation::profile | ( | TAO_Profile * | p | ) |

| Profile Accessor.

ACE_INLINE TAO_Profile * TAO_GIOP_Invocation::profile | ( | void |  | ) |

| Profile Accessor.

ACE_INLINE CORBA::ULong & TAO_GIOP_Invocation::profile_index | ( | void |  | ) |

ACE_INLINE CORBA::Boolean TAO_GIOP_Invocation::received_location_forward | ( | void |  | ) | const

| Returns true if a location forward was.

ACE_INLINE TAO_Service_Context & TAO_GIOP_Invocation::reply_service_context | ( | void |  | ) |

| Accessor to the reply ServiceContextList. Only valid when after receiving a reply message.

ACE_INLINE CORBA::ULong TAO_GIOP_Invocation::request_id | ( | void |  | ) | const

| Return the request id of this invocation.

ACE_INLINE TAO_Service_Context & TAO_GIOP_Invocation::request_service_context | ( | void |  | ) |

| Accessor to the request ServiceContextList. Only valid when sending a request message.

ACE_INLINE void TAO_GIOP_Invocation::restart_flag | ( | CORBA::Boolean | flag | ) |

| Set the value for the restart flag.

void TAO_GIOP_Invocation::start | ( | ACE_ENV_SINGLE_ARG_DECL |  | ) | throw (CORBA::SystemException)

| Establishes a connection to the remote server, initializes the GIOP headers in the output CDR. Reimplemented in TAO_GIOP_Asynch_Invocation, TAO_GIOP_Twoway_Invocation, TAO_GIOP_Oneway_Invocation, and TAO_GIOP_Locate_Request_Invocation.

ACE_INLINE TAO_Stub * TAO_GIOP_Invocation::stub | ( | void |  | ) |

| Accessor for the stub associated with this invocation.

ACE_INLINE TAO_Transport *& TAO_GIOP_Invocation::transport | ( | void |  | ) |

| Return the TAO_Transport in use for the current Invocation object.

## Member Data Documentation

char TAO_GIOP_Invocation::buffer_[ACE_CDR::DEFAULT_BUFSIZE]`[protected]`

| Buffer used for both the output and input CDR streams, this is "safe" because we only one of the streams at a time.

ACE_Countdown_Time* TAO_GIOP_Invocation::countdown_`[protected]`

| Keep track of the remaining time for this invocation.

TAO_Endpoint* TAO_GIOP_Invocation::endpoint_`[protected]`

  | This invocation is using this endpoint from Parameters:
  profile_. |

TAO_Invocation_Endpoint_Selector* TAO_GIOP_Invocation::endpoint_selector_`[protected]`

| Strategy for making decisions about which endpoint/profile to use for invocation.

CORBA::Object_var TAO_GIOP_Invocation::forward_reference_`[protected]`

| Object reference returned in a LOCATION_FORWARD reply. This reference is only valid when the reply status is TAO_INVOKE_RESTART and

CORBA::PolicyList_var TAO_GIOP_Invocation::inconsistent_policies_`[protected]`

  | If current effective policies cause the invocation to raise CORBA::INV_POLICY exception, the conflicting/problematic policies are stored in this list. This is used by Parameters:
  Object::_validate_connection | method to inform clients about causes of invocation failure. Conflicting policies are only stored in this list if
  init_inconsistent_policies | method has been called prior to the beginning of invocation. This saves extra work of conflicting policies 'logging' when it's not needed.

ACE_Time_Value* TAO_GIOP_Invocation::max_wait_time_`[protected]`

ACE_Time_Value TAO_GIOP_Invocation::max_wait_time_value_`[protected]`

TAO_Operation_Details TAO_GIOP_Invocation::op_details_`[protected]`

| The relevant operation detail.

TAO_ORB_Core* TAO_GIOP_Invocation::orb_core_`[protected]`

| The orb_core context where we make this invocation.

TAO_OutputCDR TAO_GIOP_Invocation::out_stream_`[protected]`

| Stream into which the response is placed.

TAO_Profile* TAO_GIOP_Invocation::profile_`[protected]`

| This invocation is using this profile.

CORBA::ULong TAO_GIOP_Invocation::profile_index_`[protected]`

| Keep the position of the profile that should be used in performing the invocation.

CORBA::Boolean TAO_GIOP_Invocation::received_location_forward_`[protected]`

| Flag is true when a LOCATION_FORWARD reply is received.

CORBA::Boolean TAO_GIOP_Invocation::restart_flag_`[protected]`

| This flag is turned on when the previous invocation on an endpoint or a profile returned a TAO_INVOKE_RESTART. FT CORBA relies on this flag for guarenteeing unique id's during reinvocations.

TAO_Stub* TAO_GIOP_Invocation::stub_`[protected]`

| The object on which this invocation is going.

TAO_Target_Specification TAO_GIOP_Invocation::target_spec_`[protected]`

TAO_Transport* TAO_GIOP_Invocation::transport_`[protected]`

| This invocation is using this transport. Note: may change...

The documentation for this class was generated from the following files:

- Invocation.h
- Invocation.cpp
- Invocation.i