diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-02 22:37:01 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-02 22:37:01 +0000 |
commit | e12a9b2cca636def73d9c412297f9af64effc431 (patch) | |
tree | b2d2ca2f02d438caabe385e1b76ca727c496b2da | |
parent | e3a4f6880110d5f93ec07e6cd3e3c65319dd5d84 (diff) | |
download | ATCD-e12a9b2cca636def73d9c412297f9af64effc431.tar.gz |
ChangeLogTag:Fri Jul 2 16:28:08 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r-- | TAO/tao/Asynch_Invocation.h | 7 | ||||
-rw-r--r-- | TAO/tao/Asynch_Invocation.i | 13 | ||||
-rw-r--r-- | TAO/tao/Makefile | 2 | ||||
-rw-r--r-- | TAO/tao/MessagingC.h | 15 | ||||
-rw-r--r-- | TAO/tao/MessagingS.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Reply_Dispatcher.cpp | 17 | ||||
-rw-r--r-- | TAO/tao/Reply_Dispatcher.h | 11 |
7 files changed, 56 insertions, 11 deletions
diff --git a/TAO/tao/Asynch_Invocation.h b/TAO/tao/Asynch_Invocation.h index 86b22e48669..7a69952af68 100644 --- a/TAO/tao/Asynch_Invocation.h +++ b/TAO/tao/Asynch_Invocation.h @@ -22,6 +22,7 @@ #define TAO_ASYNCH_INVOCATION_H #include "tao/Invocation.h" +#include "tao/MessagingC.h" class TAO_Export TAO_GIOP_Asynch_Invocation : public TAO_GIOP_Invocation { @@ -43,6 +44,8 @@ public: // Destructor. }; +// **************************************************************** + class TAO_Export TAO_GIOP_Twoway_Asynch_Invocation : public TAO_GIOP_Asynch_Invocation { // = TITLE @@ -56,7 +59,9 @@ class TAO_Export TAO_GIOP_Twoway_Asynch_Invocation : public TAO_GIOP_Asynch_Invo public: TAO_GIOP_Twoway_Asynch_Invocation (TAO_Stub *data, const char *operation, - TAO_ORB_Core* orb_core); + TAO_ORB_Core* orb_core, + const TAO_Reply_Handler_Skeleton &reply_handler_skel, + Messaging::ReplyHandler_ptr reply_handler_ptr); // Constructor. void start (CORBA_Environment &TAO_IN_ENV = diff --git a/TAO/tao/Asynch_Invocation.i b/TAO/tao/Asynch_Invocation.i index be368f5aa32..bcf2c6b1319 100644 --- a/TAO/tao/Asynch_Invocation.i +++ b/TAO/tao/Asynch_Invocation.i @@ -4,9 +4,12 @@ // ACE_INLINE -TAO_GIOP_Twoway_Asynch_Invocation::TAO_GIOP_Twoway_Asynch_Invocation (TAO_Stub *stub, - const char *operation, - TAO_ORB_Core *orb_core) +TAO_GIOP_Twoway_Asynch_Invocation:: +TAO_GIOP_Twoway_Asynch_Invocation (TAO_Stub *stub, + const char *operation, + TAO_ORB_Core *orb_core, + const TAO_Reply_Handler_Skeleton &reply_handler_skel, + Messaging::ReplyHandler_ptr reply_handler_ptr) : TAO_GIOP_Asynch_Invocation (stub, operation, orb_core), message_state_ (0), rd_ (0) @@ -17,7 +20,9 @@ TAO_GIOP_Twoway_Asynch_Invocation::TAO_GIOP_Twoway_Asynch_Invocation (TAO_Stub * // New Reply Dispatcher. ACE_NEW (rd_, - TAO_Asynch_Reply_Dispatcher (message_state_)); + TAO_Asynch_Reply_Dispatcher (message_state_, + reply_handler_skel, + reply_handler_ptr)); } ACE_INLINE TAO_InputCDR & diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index b2132230286..4dc37833852 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -132,6 +132,8 @@ ORB_CORE_FILES = \ Reply_Dispatcher \ IOPC \ IOPS \ + PollableC \ + PollableS \ CONV_FRAMEC \ CONV_FRAMES \ Tagged_Components diff --git a/TAO/tao/MessagingC.h b/TAO/tao/MessagingC.h index d22e41adf31..5727be80881 100644 --- a/TAO/tao/MessagingC.h +++ b/TAO/tao/MessagingC.h @@ -36,6 +36,8 @@ #include "tao/TimeBaseC.h" #include "tao/PolicyC.h" #include "tao/IOPC.h" +#include "tao/PollableC.h" +#include "tao/varout.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -1637,7 +1639,7 @@ TAO_NAMESPACE Messaging class ReplyHandler; typedef ReplyHandler *ReplyHandler_ptr; - + class TAO_Export ReplyHandler_var { public: @@ -1841,6 +1843,17 @@ TAO_NAMESPACE Messaging }; // module Messaging +// Typedef for the Reply Handler Skeleton. +// This is handcrafted not generated by the IDL compiler. + +class TAO_InputCDR; + +typedef void (*TAO_Reply_Handler_Skeleton)( + TAO_InputCDR &, + Messaging::ReplyHandler *, + CORBA::Environment & + ); + void TAO_Export operator<<= (CORBA::Any &, Messaging::PriorityRange*); // noncopying version CORBA::Boolean TAO_Export operator>>= (const CORBA::Any &, Messaging::PriorityRange *&); diff --git a/TAO/tao/MessagingS.cpp b/TAO/tao/MessagingS.cpp index e8df7334f55..920a0795a66 100644 --- a/TAO/tao/MessagingS.cpp +++ b/TAO/tao/MessagingS.cpp @@ -1728,7 +1728,7 @@ void* POA_Messaging::Poller::_downcast ( return 0; } -void POA_Messaging::Poller::_dispatch (CORBA::ServerRequest & /* req */, void * /* context */, CORBA::Environment &ACE_TRY_ENV) +void POA_Messaging::Poller::_dispatch (CORBA::ServerRequest &req, void * context, CORBA::Environment &ACE_TRY_ENV) { TAO_Skeleton skel; // pointer to skeleton for operation const char *opname = req.operation (); // retrieve operation name diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp index 5e12af36f00..b9d4f42e1ac 100644 --- a/TAO/tao/Reply_Dispatcher.cpp +++ b/TAO/tao/Reply_Dispatcher.cpp @@ -71,8 +71,12 @@ TAO_Synch_Reply_Dispatcher::message_state (void) const // ********************************************************************* // Constructor. -TAO_Asynch_Reply_Dispatcher::TAO_Asynch_Reply_Dispatcher (TAO_GIOP_Message_State* message_state) - : message_state_ (message_state) +TAO_Asynch_Reply_Dispatcher::TAO_Asynch_Reply_Dispatcher (TAO_GIOP_Message_State *message_state, + const TAO_Reply_Handler_Skeleton &reply_handler_skel, + Messaging::ReplyHandler_ptr reply_handler_ptr) + : message_state_ (message_state), + reply_handler_skel_ (reply_handler_skel), + reply_handler_ (reply_handler_ptr) { } @@ -111,7 +115,14 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status, ACE_DEBUG ((LM_DEBUG, "%N:%l:TAO_Asynch_Reply_Dispatcher::dispatch_reply:\n")); } - + + ACE_DECLARE_NEW_CORBA_ENV; + + // Call the Reply Handler's skeleton. + reply_handler_skel_ (message_state_->cdr, + reply_handler_, + ACE_TRY_ENV); + return 0; } diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h index 22b88523ab6..983467f7b46 100644 --- a/TAO/tao/Reply_Dispatcher.h +++ b/TAO/tao/Reply_Dispatcher.h @@ -20,6 +20,7 @@ #define TAO_REPLY_DISPATCHER_H #include "tao/GIOP.h" +#include "tao/MessagingC.h" // Forward Declarations. @@ -117,7 +118,9 @@ class TAO_Export TAO_Asynch_Reply_Dispatcher : public TAO_Reply_Dispatcher // public: - TAO_Asynch_Reply_Dispatcher (TAO_GIOP_Message_State* message_state); + TAO_Asynch_Reply_Dispatcher (TAO_GIOP_Message_State* message_state, + const TAO_Reply_Handler_Skeleton &reply_handler_skel, + Messaging::ReplyHandler_ptr reply_handler_ptr); // Constructor. virtual ~TAO_Asynch_Reply_Dispatcher (void); @@ -155,6 +158,12 @@ private: TAO_GIOP_Message_State *message_state_; // CDR stream for reading the input. + + 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. }; // ********************************************************************* |