Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TAO_Asynch_Reply_Dispatcher_Base Class Reference

Base class for TAO_Asynch_Reply_Dispatcher and TAO_DII_Deferred_Reply_Dispatcher. More...

#include <Asynch_Reply_Dispatcher_Base.h>

Inheritance diagram for TAO_Asynch_Reply_Dispatcher_Base:

Inheritance graph
[legend]
Collaboration diagram for TAO_Asynch_Reply_Dispatcher_Base:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Asynch_Reply_Dispatcher_Base (TAO_ORB_Core *orb_core, ACE_Allocator *allocator=0)
 Default constructor.
void transport (TAO_Transport *t)
 Sets the transport for this invocation.
virtual void reply_timed_out (void)=0
 Inform that the reply timed out.
virtual long schedule_timer (CORBA::ULong, const ACE_Time_Value &ACE_ENV_ARG_DECL)=0
 Install the timeout handler.
bool try_dispatch_reply (void)
 A helper method that can be used by the subclasses.
The Reply Dispatcher methods
virtual int dispatch_reply (TAO_Pluggable_Reply_Params &)=0
virtual void connection_closed (void)=0
Mutators for refcount
long incr_refcount (void)
long decr_refcount (void)

Protected Member Functions

virtual ~TAO_Asynch_Reply_Dispatcher_Base (void)
 Destructor.

Protected Attributes

IOP::ServiceContextList reply_service_info_
 The service context list.
char buf_ [ACE_CDR::DEFAULT_BUFSIZE]
 The buffer that is used to initialise the data block.
ACE_Data_Block db_
TAO_InputCDR reply_cdr_
TAO_Transporttransport_
 This invocation is using this transport, may change...

Private Attributes

ACE_Locklock_
 Lock to protect refcount and is_reply_dispatched_ flag.
long refcount_
 Refcount paraphernalia for this class.
bool is_reply_dispatched_
 Has the reply been dispatched?
ACE_Allocatorallocator_

Detailed Description

Base class for TAO_Asynch_Reply_Dispatcher and TAO_DII_Deferred_Reply_Dispatcher.


Constructor & Destructor Documentation

TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base TAO_ORB_Core orb_core,
ACE_Allocator allocator = 0
 

Default constructor.

TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base void   )  [protected, virtual]
 

Destructor.


Member Function Documentation

void TAO_Asynch_Reply_Dispatcher_Base::connection_closed void   )  [pure virtual]
 

The used for the pending reply has been closed. No reply is expected. @ TODO: If the connection was closed due to a CloseConnection message then we could re-issue the request instead of raising the exception, it would a matter of simply adding a boolean argument to this function.

Implements TAO_Reply_Dispatcher.

long TAO_Asynch_Reply_Dispatcher_Base::decr_refcount void   ) 
 

int TAO_Asynch_Reply_Dispatcher_Base::dispatch_reply TAO_Pluggable_Reply_Params  )  [pure virtual]
 

Dispatch the reply. Return 1 on sucess, -1 on error. @ TODO Pluggable Messaging: this method has too many arguments, the "Right Thing"[tm] is for the Transport Object to create a "ClientReply" that encapsulates all we need to process a reply. Naturally it is possible that different messaging protocols implement different variants of such ClientReply class.

Implements TAO_Reply_Dispatcher.

long TAO_Asynch_Reply_Dispatcher_Base::incr_refcount void   ) 
 

void TAO_Asynch_Reply_Dispatcher_Base::reply_timed_out void   )  [pure virtual]
 

Inform that the reply timed out.

virtual long TAO_Asynch_Reply_Dispatcher_Base::schedule_timer CORBA::ULong  ,
const ACE_Time_Value ACE_ENV_ARG_DECL
[pure virtual]
 

Install the timeout handler.

void TAO_Asynch_Reply_Dispatcher_Base::transport TAO_Transport t  ) 
 

Sets the transport for this invocation.

bool TAO_Asynch_Reply_Dispatcher_Base::try_dispatch_reply void   ) 
 

A helper method that can be used by the subclasses.

The semantics of this helper method needs careful attention. A call to this method will do the following

  • If the reply has already been dispatched, the return value will be false to signify not to try.

  • If the reply has not been dispatched, this method will set the flag to be true and return a true value to signify that the caller thread can go ahead and dispatch reply.

Why are we clumping everything in one method. Answer is we need atomicity?


Member Data Documentation

ACE_Allocator* TAO_Asynch_Reply_Dispatcher_Base::allocator_ [private]
 

Allocator that was used to allocate this reply dispatcher. In case of zero we come from the heap.

char TAO_Asynch_Reply_Dispatcher_Base::buf_[ACE_CDR::DEFAULT_BUFSIZE] [protected]
 

The buffer that is used to initialise the data block.

ACE_Data_Block TAO_Asynch_Reply_Dispatcher_Base::db_ [protected]
 

Datablock that is created on the stack to initialise the CDR stream underneath.

bool TAO_Asynch_Reply_Dispatcher_Base::is_reply_dispatched_ [private]
 

Has the reply been dispatched?

ACE_Lock* TAO_Asynch_Reply_Dispatcher_Base::lock_ [private]
 

Lock to protect refcount and is_reply_dispatched_ flag.

long TAO_Asynch_Reply_Dispatcher_Base::refcount_ [private]
 

Refcount paraphernalia for this class.

TAO_InputCDR TAO_Asynch_Reply_Dispatcher_Base::reply_cdr_ [protected]
 

CDR stream which has the reply information that needs to be demarshalled by the stubs

IOP::ServiceContextList TAO_Asynch_Reply_Dispatcher_Base::reply_service_info_ [protected]
 

The service context list.

Note, that this is not a reference as in the synchronous case. We own the reply_service_info because our TAO_Asynch_Invocation or TAO_DII_Deferred_Invocation will go out of scope before we are done.

TAO_Transport* TAO_Asynch_Reply_Dispatcher_Base::transport_ [protected]
 

This invocation is using this transport, may change...


The documentation for this class was generated from the following files:
Generated on Sun May 15 13:09:30 2005 for TAO by  doxygen 1.3.9.1