3 //=============================================================================
5 * @file Asynch_Invocation_Adapter.h
7 * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
9 //=============================================================================
11 #ifndef TAO_MESSAGING_ASYNCH_INVOCATION_ADAPTER_H
12 #define TAO_MESSAGING_ASYNCH_INVOCATION_ADAPTER_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Messaging/messaging_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Messaging/Messaging.h"
23 #include "tao/Asynch_Reply_Dispatcher_Base.h"
24 #include "tao/Invocation_Adapter.h"
25 #include "ace/Global_Macros.h"
26 #include "ace/Auto_Functor.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 ACE_END_VERSIONED_NAMESPACE_DECL
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 class TAO_Operation_Details
;
36 class TAO_Asynch_Reply_Dispatcher
;
37 class TAO_Asynch_Reply_Dispatcher_Base
;
48 class Collocation_Proxy_Broker
;
51 * @class Asynch_Invocation_Adapter
53 * @brief Generic interface for the invocation object visible to the
57 class TAO_Messaging_Export Asynch_Invocation_Adapter
58 : public Invocation_Adapter
61 Asynch_Invocation_Adapter (
62 CORBA::Object
*target
,
65 const char *operation
,
67 int collocation_opportunity
,
68 TAO::Invocation_Mode mode
= TAO_ASYNCHRONOUS_CALLBACK_INVOCATION
,
69 bool has_in_args
= true);
71 void invoke (Messaging::ReplyHandler_ptr reply_handler_ptr
,
72 const TAO_Reply_Handler_Stub
&reply_handler_stub
);
74 virtual void invoke (const TAO::Exception_Data
*ex
, unsigned long ex_count
);
77 virtual Invocation_Status
invoke_twoway (
78 TAO_Operation_Details
&op
,
79 CORBA::Object_var
&effective_target
,
80 Profile_Transport_Resolver
&r
,
81 ACE_Time_Value
*&max_wait_time
,
82 Invocation_Retry_State
*retry_state
= 0);
84 virtual Invocation_Status
invoke_collocated_i (
86 TAO_Operation_Details
&details
,
87 CORBA::Object_var
&effective_target
,
88 Collocation_Strategy strat
);
91 /// Autofunctor to manage the reply dispatcher
92 ACE_Utils::Auto_Functor
<TAO_Asynch_Reply_Dispatcher_Base
,
93 ARDB_Refcount_Functor
> safe_rd_
;
96 Asynch_Invocation_Adapter () = delete;
97 Asynch_Invocation_Adapter (const Asynch_Invocation_Adapter
&) = delete;
98 Asynch_Invocation_Adapter
& operator= (const Asynch_Invocation_Adapter
&) = delete;
100 } // End namespace TAO
102 TAO_END_VERSIONED_NAMESPACE_DECL
104 #include /**/ "ace/post.h"
106 #endif /* TAO_MESSAGING_ASYNCH_INVOCATION_ADAPTER_H */