Reply_Dispatcher.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     Reply_Dispatcher.h
00006  *
00007  *  Reply_Dispatcher.h,v 1.40 2005/11/02 11:03:26 ossama Exp
00008  *
00009  *   Define the interface for the Reply_Dispatcher strategies.
00010  *
00011  *
00012  *  @author  Alexander Babu Arulanthu <alex@cs.wustl.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef TAO_REPLY_DISPATCHER_H
00017 #define TAO_REPLY_DISPATCHER_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "tao/TAO_Export.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "tao/Basic_Types.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 // Forward Declarations.
00032 class TAO_GIOP_Message_State;
00033 class TAO_GIOP_Message_Version;
00034 class TAO_Transport;
00035 class TAO_Pluggable_Reply_Params;
00036 
00037 /**
00038  * @class TAO_Reply_Dispatcher
00039  *
00040  *
00041  * Different invocation modes process the Reply messages in
00042  * different ways.  Traditional synchronous replies simply receive
00043  * the message and wake up the waiting thread (if any).
00044  * Asynchronous Method Invocation (Callbacks) must process the
00045  * message in the thread that receives it.
00046  * Deferred Synchronous (DII) and AMI in the Poller mode save the
00047  * reply for later processing in the application.
00048  * The lower level components in the ORB only deal with this
00049  * abstract interface, when the invocation is made the right type
00050  * of Reply Dispatcher is instantiated and registered with the
00051  * Transport object.
00052  */
00053 class TAO_Export TAO_Reply_Dispatcher
00054 {
00055 
00056 public:
00057   /// Constructor.
00058   TAO_Reply_Dispatcher (void);
00059 
00060   /// Destructor.
00061   virtual ~TAO_Reply_Dispatcher (void);
00062 
00063   /**
00064    * Dispatch the reply. Return 1 on sucess, -1 on error.
00065    * @todo Pluggable Messaging:  this method has too many arguments,
00066    *    the "Right Thing"[tm] is for the Transport Object to create a
00067    *    "ClientReply" that encapsulates all we need to process a
00068    *    reply.  Naturally it is possible that different messaging
00069    *    protocols implement different variants of such ClientReply
00070    *    class.
00071    */
00072   virtual int dispatch_reply (TAO_Pluggable_Reply_Params &params) = 0;
00073 
00074   /**
00075    * The used for the pending reply has been closed.
00076    * No reply is expected.
00077    * @todo If the connection was closed due to a CloseConnection
00078    *    message then we could re-issue the request instead of raising
00079    *    the exception, it would a matter of simply adding a boolean
00080    *    argument to this function.
00081    */
00082   virtual void connection_closed (void) = 0;
00083 
00084   /// Get the reply status.
00085   CORBA::ULong reply_status (void) const;
00086 
00087 protected:
00088   /// Reply or LocateReply status.
00089   CORBA::ULong reply_status_;
00090 };
00091 
00092 TAO_END_VERSIONED_NAMESPACE_DECL
00093 
00094 #if defined (__ACE_INLINE__)
00095 #include "tao/Reply_Dispatcher.i"
00096 #endif /* __ACE_INLINE__ */
00097 
00098 #include /**/ "ace/post.h"
00099 
00100 #endif /* TAO_REPLY_DISPATCHER_H */

Generated on Thu Nov 9 11:54:21 2006 for TAO by doxygen 1.3.6