Reply_Dispatcher.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     Reply_Dispatcher.h
00006  *
00007  *  $Id: Reply_Dispatcher.h 78995 2007-07-23 11:59:20Z johnnyw $
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_Pluggable_Reply_Params;
00033 
00034 /**
00035  * @class TAO_Reply_Dispatcher
00036  *
00037  *
00038  * Different invocation modes process the Reply messages in
00039  * different ways.  Traditional synchronous replies simply receive
00040  * the message and wake up the waiting thread (if any).
00041  * Asynchronous Method Invocation (Callbacks) must process the
00042  * message in the thread that receives it.
00043  * Deferred Synchronous (DII) and AMI in the Poller mode save the
00044  * reply for later processing in the application.
00045  * The lower level components in the ORB only deal with this
00046  * abstract interface, when the invocation is made the right type
00047  * of Reply Dispatcher is instantiated and registered with the
00048  * Transport object.
00049  */
00050 class TAO_Export TAO_Reply_Dispatcher
00051 {
00052 
00053 public:
00054   /// Constructor.
00055   TAO_Reply_Dispatcher (void);
00056 
00057   /// Destructor.
00058   virtual ~TAO_Reply_Dispatcher (void);
00059 
00060   /**
00061    * Dispatch the reply. Return 1 on sucess, -1 on error.
00062    * @todo Pluggable Messaging:  this method has too many arguments,
00063    *    the "Right Thing"[tm] is for the Transport Object to create a
00064    *    "ClientReply" that encapsulates all we need to process a
00065    *    reply.  Naturally it is possible that different messaging
00066    *    protocols implement different variants of such ClientReply
00067    *    class.
00068    */
00069   virtual int dispatch_reply (TAO_Pluggable_Reply_Params &params) = 0;
00070 
00071   /**
00072    * The used for the pending reply has been closed.
00073    * No reply is expected.
00074    * @todo If the connection was closed due to a CloseConnection
00075    *    message then we could re-issue the request instead of raising
00076    *    the exception, it would a matter of simply adding a boolean
00077    *    argument to this function.
00078    */
00079   virtual void connection_closed (void) = 0;
00080 
00081   /// Get the reply status.
00082   CORBA::ULong reply_status (void) const;
00083 
00084 protected:
00085   /// Reply or LocateReply status.
00086   CORBA::ULong reply_status_;
00087 };
00088 
00089 TAO_END_VERSIONED_NAMESPACE_DECL
00090 
00091 #if defined (__ACE_INLINE__)
00092 #include "tao/Reply_Dispatcher.inl"
00093 #endif /* __ACE_INLINE__ */
00094 
00095 #include /**/ "ace/post.h"
00096 
00097 #endif /* TAO_REPLY_DISPATCHER_H */

Generated on Sun Jan 27 13:07:36 2008 for TAO by doxygen 1.3.6