summaryrefslogtreecommitdiff
path: root/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
blob: 0e85f49156e2c18f23b7b98f7520a0071c6a02bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Asynch_Invocation_Adapter.h
 *
 *  $Id$
 *
 *
 *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
 */
//=============================================================================
#ifndef TAO_MESSAGING_ASYNCH_INVOCATION_ADAPTER_H
#define TAO_MESSAGING_ASYNCH_INVOCATION_ADAPTER_H
#include /**/ "ace/pre.h"

#include "tao/Messaging/messaging_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/Invocation_Adapter.h"
#include "ace/CORBA_macros.h"
#include "ace/Global_Macros.h"
#include "tao/Messaging/Messaging.h"

class TAO_Operation_Details;
class TAO_Stub;
class ACE_Time_Value;
class TAO_Asynch_Reply_Dispatcher;

namespace  CORBA
{
  class Object;
  class Environment;
  class SystemException;
}

namespace TAO
{
  class Argument;

  class Collocation_Proxy_Broker;

  /**
   * @class Asynch_Invocation_Adapter
   *
   * @brief Generic interface for the invocation object visible to the
   * IDL compiler.
   *
   */
  class TAO_Messaging_Export Asynch_Invocation_Adapter : public Invocation_Adapter
  {
  public:
    Asynch_Invocation_Adapter (
        CORBA::Object *target,
        Argument **args,
        int arg_number,
        char *operation,
        int op_len,
        Collocation_Proxy_Broker *b,
        TAO::Invocation_Mode mode = TAO_ASYNCHRONOUS_CALLBACK_INVOCATION);

    void invoke (Messaging::ReplyHandler_ptr reply_handler_ptr,
                 const TAO_Reply_Handler_Skeleton &reply_handler_skel
                 ACE_ENV_ARG_DECL);

  protected:

    /**
    virtual void invoke_collocated (TAO_Stub *,
                                    TAO_Operation_Details &op
                                    ACE_ENV_ARG_DECL);
    **/
    virtual void invoke_remote (TAO_Stub *,
                                TAO_Operation_Details &op
                                ACE_ENV_ARG_DECL);

  private:

  private:
    TAO_Asynch_Reply_Dispatcher *rd_;

  private:
    /// Dont allow default initializations
    ACE_UNIMPLEMENTED_FUNC (Asynch_Invocation_Adapter (void));

    ACE_UNIMPLEMENTED_FUNC (Asynch_Invocation_Adapter & operator= (const Asynch_Invocation_Adapter &));

  };
} // End namespace TAO


#include /**/ "ace/post.h"
#endif /*TAO_MESSAGING_ASYNCH_INVOCATION_ADAPTER_H*/