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

TAO_GIOP_Oneway_Invocation Class Reference

Encapsulate a one-way invocation. More...

#include <Invocation.h>

Inheritance diagram for TAO_GIOP_Oneway_Invocation:

Inheritance graph
[legend]
Collaboration diagram for TAO_GIOP_Oneway_Invocation:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_GIOP_Oneway_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. More...

virtual ~TAO_GIOP_Oneway_Invocation (void)
 Destructor. 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 invoke (ACE_ENV_SINGLE_ARG_DECL) throw (CORBA::SystemException)
 Send request, without blocking for any response. More...

Messaging::SyncScope sync_scope (void)
 Accessor for private member. More...


Private Attributes

Messaging::SyncScope sync_scope_
 Our sync scope. More...


Detailed Description

Encapsulate a one-way invocation.

Definition at line 444 of file Invocation.h.


Constructor & Destructor Documentation

TAO_GIOP_Oneway_Invocation::TAO_GIOP_Oneway_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.

Definition at line 990 of file Invocation.cpp.

References TAO_ORB_Core::call_sync_scope_hook, TAO_GIOP_Invocation::orb_core_, and Messaging::SYNC_WITH_TRANSPORT.

00998   : TAO_GIOP_Synch_Invocation (stub,
00999                                operation,
01000                                opname_len,
01001                                argument_flag,
01002                                orb_core,
01003                                byte_order),
01004     sync_scope_ (Messaging::SYNC_WITH_TRANSPORT)
01005 {
01006   int has_synchronization = 0;
01007   this->orb_core_->call_sync_scope_hook (this->stub_,
01008                                          has_synchronization,
01009                                          this->sync_scope_);
01010 }

ACE_INLINE TAO_GIOP_Oneway_Invocation::~TAO_GIOP_Oneway_Invocation void    [virtual]
 

Destructor.

Definition at line 193 of file Invocation.i.

00194 {
00195 }


Member Function Documentation

int TAO_GIOP_Oneway_Invocation::invoke ACE_ENV_SINGLE_ARG_DECL    throw (CORBA::SystemException)
 

Send request, without blocking for any response.

Definition at line 1021 of file Invocation.cpp.

References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, ACE_THROW_RETURN, TAO_GIOP_Invocation::invoke, TAO_DEFAULT_MINOR_CODE, TAO_INVOKE_EXCEPTION, TAO_Transport::TAO_ONEWAY_REQUEST, and TAO_Transport::TAO_TWOWAY_REQUEST.

01023 {
01024   if (this->sync_scope_ == Messaging::SYNC_NONE
01025       || this->sync_scope_ == TAO::SYNC_EAGER_BUFFERING
01026       || this->sync_scope_ == TAO::SYNC_DELAYED_BUFFERING)
01027     {
01028       return TAO_GIOP_Invocation::invoke (TAO_Transport::TAO_ONEWAY_REQUEST
01029                                           ACE_ENV_ARG_PARAMETER);
01030     }
01031   if (this->sync_scope_ == Messaging::SYNC_WITH_TRANSPORT)
01032     {
01033       return TAO_GIOP_Invocation::invoke (TAO_Transport::TAO_TWOWAY_REQUEST
01034                                           ACE_ENV_ARG_PARAMETER);
01035     }
01036 
01037   int retval = this->invoke_i (0
01038                                ACE_ENV_ARG_PARAMETER);
01039   ACE_CHECK_RETURN (TAO_INVOKE_EXCEPTION);
01040 
01041   // A TAO_INVOKE_EXCEPTION status, but no exception raised means that
01042   // we have a user exception.
01043   // @@ This is a bit brittle, think about a better implementation.
01044   if (retval == TAO_INVOKE_EXCEPTION)
01045     {
01046       // Pull the exception from the stream.
01047       CORBA::String_var buf;
01048 
01049       if ((this->inp_stream () >> buf.inout ()) == 0)
01050         {
01051           // Could not demarshal the exception id, raise an local
01052           // CORBA::MARSHAL
01053           ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE,
01054                                             CORBA::COMPLETED_MAYBE),
01055                             TAO_INVOKE_EXCEPTION);
01056         }
01057 
01058       // This kind of exception shouldn't happen with oneways,
01059       // but if it does, we turn it into a CORBA::UNKNOWN exception.
01060       ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
01061                                         CORBA::COMPLETED_YES),
01062                         TAO_INVOKE_EXCEPTION);
01063     }
01064 
01065   return retval;
01066 }

void TAO_GIOP_Oneway_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 from TAO_GIOP_Invocation.

Definition at line 1013 of file Invocation.cpp.

References ACE_CHECK, ACE_ENV_SINGLE_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, and TAO_GIOP_Invocation::start.

ACE_INLINE Messaging::SyncScope TAO_GIOP_Oneway_Invocation::sync_scope void   
 

Accessor for private member.

Definition at line 198 of file Invocation.i.

References sync_scope_.

Referenced by TAO_ClientRequestInfo_i::sync_scope.

00199 {
00200   return this->sync_scope_;
00201 }


Member Data Documentation

Messaging::SyncScope TAO_GIOP_Oneway_Invocation::sync_scope_ [private]
 

Our sync scope.

Definition at line 475 of file Invocation.h.

Referenced by sync_scope.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:17:13 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002