Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / Messaging / Asynch_Invocation_Adapter.h
blob88bfcfc8c3cc83330781d42e8d3afab6fe054aea
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Asynch_Invocation_Adapter.h
7 * @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
8 */
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)
19 # 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
29 class ACE_Time_Value;
30 ACE_END_VERSIONED_NAMESPACE_DECL
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 class TAO_Operation_Details;
35 class TAO_Stub;
36 class TAO_Asynch_Reply_Dispatcher;
37 class TAO_Asynch_Reply_Dispatcher_Base;
39 namespace CORBA
41 class Object;
44 namespace TAO
46 class Argument;
48 class Collocation_Proxy_Broker;
50 /**
51 * @class Asynch_Invocation_Adapter
53 * @brief Generic interface for the invocation object visible to the
54 * IDL compiler.
57 class TAO_Messaging_Export Asynch_Invocation_Adapter
58 : public Invocation_Adapter
60 public:
61 Asynch_Invocation_Adapter (
62 CORBA::Object *target,
63 Argument **args,
64 int arg_number,
65 const char *operation,
66 size_t op_len,
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);
76 protected:
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 (
85 TAO_Stub *stub,
86 TAO_Operation_Details &details,
87 CORBA::Object_var &effective_target,
88 Collocation_Strategy strat);
90 private:
91 /// Autofunctor to manage the reply dispatcher
92 ACE_Utils::Auto_Functor<TAO_Asynch_Reply_Dispatcher_Base,
93 ARDB_Refcount_Functor> safe_rd_;
95 private:
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 */