summaryrefslogtreecommitdiff
path: root/ACE/TAO/tao/RTCORBA/RT_Transport_Descriptor_Property.h
blob: 5b29b9b7fcc889a76b4980174ecc89c9677ac70b (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// -*- C++ -*-

/**
 *  @file RT_Transport_Descriptor_Property.h
 *
 *  $Id$
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 */

#ifndef TAO_RT_TRANSPORT_DESCRIPTOR_PROPERTY_H
#define TAO_RT_TRANSPORT_DESCRIPTOR_PROPERTY_H

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

#include "tao/RTCORBA/rtcorba_export.h"

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

#include "tao/Basic_Types.h"

#include "ace/Global_Macros.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

/**
 * @class TAO_RT_Transport_Descriptor_Property
 *
 * @brief Base RT Transport Descriptor Property that can be <insert> ed into the TAO_RT_Transport_Descriptor class.
 *
 */
class TAO_RTCORBA_Export TAO_RT_Transport_Descriptor_Property
{
  friend class TAO_RT_Transport_Descriptor;

public:
  /// Constructor
  TAO_RT_Transport_Descriptor_Property (void);

  /// Destructor
  virtual ~TAO_RT_Transport_Descriptor_Property (void);

  virtual TAO_RT_Transport_Descriptor_Property *duplicate (void) = 0;

  virtual CORBA::Boolean is_equivalent (const TAO_RT_Transport_Descriptor_Property *other_prop) = 0;

protected:
  /// Properties can be chanined using the <next_> pointer;
  TAO_RT_Transport_Descriptor_Property* next_;

private:
  // = Disallow copying and assignment.
  TAO_RT_Transport_Descriptor_Property (const TAO_RT_Transport_Descriptor_Property &);
  TAO_RT_Transport_Descriptor_Property & operator= (const TAO_RT_Transport_Descriptor_Property &);
};

/**
 * @class TAO_RT_Transport_Descriptor_Private_Connection_Property
 *
 * @brief Descriptor Property for Private Connections.
 *
 * Holds info necessary to identify private connections and
 * store/look them up in the Transport Cache.  (For description
 * of private connections see RTCORBA::PrivateTransportPolicy.)
 *
 */
class TAO_RTCORBA_Export TAO_RT_Transport_Descriptor_Private_Connection_Property
  : public TAO_RT_Transport_Descriptor_Property
{
public:
  /// Constructor
  TAO_RT_Transport_Descriptor_Private_Connection_Property (void);
  TAO_RT_Transport_Descriptor_Private_Connection_Property (long object_id);

  /// Destructor
  ~TAO_RT_Transport_Descriptor_Private_Connection_Property (void);

  /// Init
  void init (long object_id);

  virtual TAO_RT_Transport_Descriptor_Property *duplicate (void);

  virtual CORBA::Boolean is_equivalent (const TAO_RT_Transport_Descriptor_Property *other_prop);

private:
  /**
   * Unique identifier of the object to which private connection
   * identified with this descriptor belongs.  The value of
   * @c object_id_ is the @c TAO_Stub* of the object.
   */
  long object_id_;

};

/*****************************************************************************/

/**
 * @class TAO_RT_Transport_Descriptor_Banded_Connection_Property
 *
 * @brief Descriptor Property for Banded Connections.
 *
 * This property holds the Band information necessary to identify a banded connection.
 *
 */
class TAO_RTCORBA_Export TAO_RT_Transport_Descriptor_Banded_Connection_Property
  : public TAO_RT_Transport_Descriptor_Property
{
public:
  /// Constructor
  TAO_RT_Transport_Descriptor_Banded_Connection_Property (void);
  TAO_RT_Transport_Descriptor_Banded_Connection_Property (CORBA::Short low_priority,
                                                          CORBA::Short high_priority);

  /// Destructor
  ~TAO_RT_Transport_Descriptor_Banded_Connection_Property (void);

  /// Init
  void init (CORBA::Short low_priority, CORBA::Short high_priority);

  virtual TAO_RT_Transport_Descriptor_Property *duplicate (void);

  virtual CORBA::Boolean is_equivalent (const TAO_RT_Transport_Descriptor_Property *other_prop);

protected:
  /// The low priority of the Band.
  CORBA::Short low_priority_;

  /// The high priority of the Band.
  CORBA::Short high_priority_;
};

TAO_END_VERSIONED_NAMESPACE_DECL

/*****************************************************************************/

#if defined (__ACE_INLINE__)
#include "tao/RTCORBA/RT_Transport_Descriptor_Property.inl"
#endif /* __ACE_INLINE__ */

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

#endif /* TAO_RT_TRANSPORT_DESCRIPTOR_PROPERTY_H */