1 //=============================================================================
3 * @file Asynch_Reply_Dispatcher.h
5 * @author Alexander Babu Arulanthu <alex@cs.wustl.edu>
6 * @author Jeff Parsons <parsons@cs.wustl.edu>
8 //=============================================================================
10 #ifndef TAO_ASYNCH_REPLY_DISPATCHER_H
11 #define TAO_ASYNCH_REPLY_DISPATCHER_H
12 #include /**/ "ace/pre.h"
14 #include "tao/Messaging/Messaging.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "tao/Messaging/Asynch_Timeout_Handler.h"
21 #include "tao/Asynch_Reply_Dispatcher_Base.h"
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
25 ACE_END_VERSIONED_NAMESPACE_DECL
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 /// Reply dispatcher for Asynchoronous Method Invocation (AMI)s.
30 class TAO_Asynch_Reply_Dispatcher
31 : public TAO_Asynch_Reply_Dispatcher_Base
35 TAO_Asynch_Reply_Dispatcher (
36 const TAO_Reply_Handler_Stub
&reply_handler_stub
,
37 Messaging::ReplyHandler_ptr reply_handler_ptr
,
38 TAO_ORB_Core
*orb_core
,
39 ACE_Allocator
*allocator
);
42 virtual ~TAO_Asynch_Reply_Dispatcher () = default;
44 /// @name The Reply Dispatcher methods
46 virtual int dispatch_reply (TAO_Pluggable_Reply_Params
¶ms
);
48 virtual void connection_closed ();
51 /// Inform that the reply timed out
52 virtual void reply_timed_out ();
54 /// Install the timeout handler
55 long schedule_timer (CORBA::ULong request_id
,
56 const ACE_Time_Value
&max_wait_time
);
59 /// Stub for the call back method in the Reply Handler.
60 TAO_Reply_Handler_Stub
const reply_handler_stub_
;
62 /// Reply Handler passed in the Asynchronous Invocation.
63 Messaging::ReplyHandler_var reply_handler_
;
65 /// Timeout Handler in case of AMI timeouts
66 TAO_Asynch_Timeout_Handler
*timeout_handler_
;
69 TAO_END_VERSIONED_NAMESPACE_DECL
71 #include /**/ "ace/post.h"
72 #endif /* TAO_ASYNCH_REPLY_DISPATCHER_H */