summaryrefslogtreecommitdiff
path: root/TAO/tao/Collocated_Invocation.h
blob: 02f3cfd7c4370d4b18119a36f9c172b33b68eccc (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
97
98
99
100
101
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Collocated_Invocation.h
 *
 *  $Id$
 *
 *
 *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
 */
//=============================================================================

#ifndef TAO_COLLOCATED_INVOCATION_H
#define TAO_COLLOCATED_INVOCATION_H

#include /**/ "ace/pre.h"

#include /**/ "tao/TAO_Export.h"

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

#include "tao/Collocation_Strategy.h"
#include "tao/Invocation_Base.h"
#include "tao/Exception.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

class TAO_Operation_Details;
class TAO_Stub;

namespace TAO
{
  class Profile_Transport_Resolver;
  class Argument;
  class Collocation_Proxy_Broker;

  /**
   * @class Collocated_Invocation
   *
   * @brief Class for Collocated invocations
   *
   * @note Reliable oneways are not handled properly including use of
   * interceptors. This class should technically serve as the base
   * for all invocation types. But now, this is the only class that
   * handles collocated invocations and that too in a brain dead way.
   */
  class TAO_Export Collocated_Invocation : public Invocation_Base
  {
  public:
    /// Constructor used by TAO::Invocation_Adapter
    /**
     * @param t The target on which invocation first started.
     *
     * @param et The effective target in which this invocation is now
     * flowing
     *
     * @param stub Stub for effective target @a et
     *
     * @param detail operation details of the invocation including
     * the service context list
     *
     * @param response_expected flag to indicate whether the
     * operation encapsulated by @a detail returns a response or not.
     */
    Collocated_Invocation (CORBA::Object_ptr t,
                           CORBA::Object_ptr et,
                           TAO_Stub *stub,
                           TAO_Operation_Details &detail,
                           bool response_expected = true);

    /// Invocation on the collocated object mediated through this
    /// class.
    /**
     * Practically this method is a place holder to do the
     * following
     *  - Call the start and end interception points on the client
     *    side.
     *
     *  - Handle location forwards that could be thrown by the
     *    servant.
     *
     */
    Invocation_Status invoke (Collocation_Proxy_Broker *cpb,
                              Collocation_Strategy strat
                              ACE_ENV_ARG_DECL);

  private:

    // Disallow default construction.
    Collocated_Invocation (void);

  };
}

TAO_END_VERSIONED_NAMESPACE_DECL

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