summaryrefslogtreecommitdiff
path: root/TAO/tao/Reply_Dispatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Reply_Dispatcher.h')
-rw-r--r--TAO/tao/Reply_Dispatcher.h94
1 files changed, 89 insertions, 5 deletions
diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h
index 90132289124..1d9ee9c4f7b 100644
--- a/TAO/tao/Reply_Dispatcher.h
+++ b/TAO/tao/Reply_Dispatcher.h
@@ -1,3 +1,4 @@
+// This may look like C, but it's really -*- C++ -*-
// $Id$
// ============================================================================
@@ -20,6 +21,7 @@
#define TAO_REPLY_DISPATCHER_H
#include "tao/GIOP.h"
+#include "tao/MessagingC.h"
// Forward Declarations.
@@ -47,12 +49,18 @@ public:
// Dispatch the reply.
virtual TAO_GIOP_Message_State *message_state (void) const;
- // Get the Message State
- // By default it returns <0> but if the request can pre-allocate one
- // for us then we can return it and pass it along for non-Muxed
- // transports.
+ // Get the Message State into which the reply has been read.
+
+ // virtual int reply_received (void) const;
+ // Return the reply received flag.
+
+ // protected:
+ // int reply_received_;
+ // Reply received flag.
};
+// *********************************************************************
+
class TAO_Export TAO_Synch_Reply_Dispatcher : public TAO_Reply_Dispatcher
{
// = TITLE
@@ -63,7 +71,7 @@ class TAO_Export TAO_Synch_Reply_Dispatcher : public TAO_Reply_Dispatcher
//
public:
- TAO_Synch_Reply_Dispatcher (TAO_GIOP_Message_State* message_state);
+ TAO_Synch_Reply_Dispatcher (TAO_ORB_Core *orb_core);
// Constructor.
virtual ~TAO_Synch_Reply_Dispatcher (void);
@@ -73,6 +81,67 @@ public:
// Get the reply status.
const TAO_GIOP_Version& version (void) const;
+ // Get the GIOP version.
+
+ TAO_GIOP_ServiceContextList& reply_ctx (void);
+ // Get the reply context
+
+ virtual int dispatch_reply (CORBA::ULong reply_status,
+ const TAO_GIOP_Version& version,
+ TAO_GIOP_ServiceContextList& reply_ctx,
+ TAO_GIOP_Message_State* message_state);
+ // Dispatch the reply. Copy the buffers and return. Since the
+ // invocation is synchronous demarshalling will take place on the
+ // stack.
+
+ virtual TAO_GIOP_Message_State *message_state (void) const;
+ // Return the message state of this invocation.
+
+ virtual TAO_InputCDR &reply_cdr (void);
+ // Return the reply CDR.
+
+private:
+ CORBA::ULong reply_status_;
+ // Reply or LocateReply status.
+
+ TAO_GIOP_Version version_;
+ // The version
+
+ TAO_GIOP_ServiceContextList reply_ctx_;
+ // The service context list
+
+ TAO_GIOP_Message_State *message_state_;
+ // CDR stream for reading the input.
+ // @@ Carlos : message_state should go away. All we need is the reply
+ // cdr. Is that rite? (Alex).
+
+ TAO_InputCDR reply_cdr_;
+ // CDR where the reply message is placed.
+};
+
+// *********************************************************************
+#if defined (TAO_HAS_CORBA_MESSAGING) && defined (TAO_POLLER)
+class TAO_Export TAO_Asynch_Reply_Dispatcher : public TAO_Reply_Dispatcher
+{
+ // = TITLE
+ //
+ // Reply dispatcher for Asynchoronous Method Invocation (AMI)s.
+ //
+ // = DESCRIPTION
+ //
+
+public:
+ TAO_Asynch_Reply_Dispatcher (const TAO_Reply_Handler_Skeleton &reply_handler_skel,
+ Messaging::ReplyHandler_ptr reply_handler_ptr);
+ // Constructor.
+
+ virtual ~TAO_Asynch_Reply_Dispatcher (void);
+ // Destructor.
+
+ CORBA::ULong reply_status (void) const;
+ // Get the reply status.
+
+ const TAO_GIOP_Version& version (void) const;
// Get the GIOP version
TAO_GIOP_ServiceContextList& reply_ctx (void);
@@ -82,7 +151,12 @@ public:
const TAO_GIOP_Version& version,
TAO_GIOP_ServiceContextList& reply_ctx,
TAO_GIOP_Message_State* message_state);
+ // Dispatch the reply. This involves demarshalling the reply and
+ // calling the appropriate call back hook method on the reply
+ // handler.
+
virtual TAO_GIOP_Message_State *message_state (void) const;
+ // Return the message state.
private:
CORBA::ULong reply_status_;
@@ -96,7 +170,17 @@ private:
TAO_GIOP_Message_State *message_state_;
// CDR stream for reading the input.
+ // @@ Carlos : message_state should go away. All we need is the reply
+ // cdr. Is that rite? (Alex).
+
+ const TAO_Reply_Handler_Skeleton reply_handler_skel_;
+ // Skeleton for the call back method in the Reply Handler.
+
+ Messaging::ReplyHandler_ptr reply_handler_;
+ // Reply Handler passed in the Asynchronous Invocation.
};
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_POLLER */
+// *********************************************************************
#if defined (__ACE_INLINE__)
#include "tao/Reply_Dispatcher.i"