Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound 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 Methods

 TAO_Asynch_Reply_Dispatcher_Base (TAO_ORB_Core *orb_core)
 Default constructor. More...

virtual ~TAO_Asynch_Reply_Dispatcher_Base (void)
 Destructor. More...

void transport (TAO_Transport *t)
 Sets the transport for this invocation. More...

virtual int dispatch_reply (TAO_Pluggable_Reply_Params &params)
virtual void connection_closed (void)
virtual void reply_timed_out (void)
 Inform that the reply timed out. More...

virtual long schedule_timer (CORBA::ULong request_id, const ACE_Time_Value &max_wait_time)
 Install the timeout handler. More...


Protected Attributes

IOP::ServiceContextList reply_service_info_
 The service context list. More...

char buf_ [ACE_CDR::DEFAULT_BUFSIZE]
 The buffer that is used to initialise the data block. More...

ACE_Data_Block db_
 datablock that is created on the stack to initialise the CDR stream underneath. More...

TAO_InputCDR reply_cdr_
 CDR stream which has the reply information that needs to be demarshalled by the stubs. More...

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


Detailed Description

Base class for TAO_Asynch_Reply_Dispatcher and TAO_DII_Deferred_Reply_Dispatcher.

Definition at line 31 of file Asynch_Reply_Dispatcher_Base.h.


Constructor & Destructor Documentation

TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base TAO_ORB_Core   orb_core
 

Default constructor.

Definition at line 19 of file Asynch_Reply_Dispatcher_Base.cpp.

References TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, and TAO_ENCAP_BYTE_ORDER.

00020   : db_ (sizeof buf_,
00021          ACE_Message_Block::MB_DATA,
00022          this->buf_,
00023          orb_core->input_cdr_buffer_allocator (),
00024          orb_core->locking_strategy (),
00025          ACE_Message_Block::DONT_DELETE,
00026          orb_core->input_cdr_dblock_allocator ()),
00027     reply_cdr_ (&db_,
00028                 ACE_Message_Block::MB_DATA,
00029                 TAO_ENCAP_BYTE_ORDER,
00030                 TAO_DEF_GIOP_MAJOR,
00031                 TAO_DEF_GIOP_MINOR,
00032                 orb_core),
00033     transport_ (0)
00034 {
00035 }

TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base void    [virtual]
 

Destructor.

Definition at line 38 of file Asynch_Reply_Dispatcher_Base.cpp.

References TAO_Transport::idle_after_reply, TAO_Transport::release, and transport_.

00039 {
00040   if (this->transport_ != 0)
00041     {
00042       this->transport_->idle_after_reply ();
00043       TAO_Transport::release (this->transport_);
00044     }
00045 }


Member Function Documentation

void TAO_Asynch_Reply_Dispatcher_Base::connection_closed void    [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.

Definition at line 58 of file Asynch_Reply_Dispatcher_Base.cpp.

00059 {
00060 }

int TAO_Asynch_Reply_Dispatcher_Base::dispatch_reply TAO_Pluggable_Reply_Params   params [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.

Definition at line 49 of file Asynch_Reply_Dispatcher_Base.cpp.

00052 {
00053   return 0;
00054 }

void TAO_Asynch_Reply_Dispatcher_Base::reply_timed_out void    [virtual]
 

Inform that the reply timed out.

Definition at line 63 of file Asynch_Reply_Dispatcher_Base.cpp.

00064 {
00065 }

long TAO_Asynch_Reply_Dispatcher_Base::schedule_timer CORBA::ULong    request_id,
const ACE_Time_Value   max_wait_time
[virtual]
 

Install the timeout handler.

Definition at line 68 of file Asynch_Reply_Dispatcher_Base.cpp.

00070 {
00071   return 0;
00072 }

ACE_INLINE void TAO_Asynch_Reply_Dispatcher_Base::transport TAO_Transport   t
 

Sets the transport for this invocation.

Definition at line 4 of file Asynch_Reply_Dispatcher_Base.i.

References TAO_Transport::_duplicate, TAO_Transport::release, and transport_.

00005 {
00006   if (this->transport_ != 0) {
00007     TAO_Transport::release (this->transport_);
00008   }
00009   this->transport_ = TAO_Transport::_duplicate (t);
00010 }


Member Data Documentation

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

The buffer that is used to initialise the data block.

Definition at line 68 of file Asynch_Reply_Dispatcher_Base.h.

ACE_Data_Block TAO_Asynch_Reply_Dispatcher_Base::db_ [protected]
 

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

Definition at line 72 of file Asynch_Reply_Dispatcher_Base.h.

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.

Definition at line 76 of file Asynch_Reply_Dispatcher_Base.h.

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.

Definition at line 65 of file Asynch_Reply_Dispatcher_Base.h.

TAO_Transport* TAO_Asynch_Reply_Dispatcher_Base::transport_ [protected]
 

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

Definition at line 79 of file Asynch_Reply_Dispatcher_Base.h.

Referenced by transport, and ~TAO_Asynch_Reply_Dispatcher_Base.


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