blob: e05a3f035cfd0c1a1faf8e4b4d300579ee0f6de8 (
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
|
// -*- C++ -*-
// ===================================================================
/**
* @file Transport_Descriptor_Interface.h
*
* @author Bala Natarajan <bala@cs.wustl.edu>
*/
// ===================================================================
#ifndef TAO_CONNECTION_DESCRIPTOR_INTERFACE_H
#define TAO_CONNECTION_DESCRIPTOR_INTERFACE_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/Basic_Types.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_Endpoint;
/**
* @class TAO_Transport_Descriptor_Interface
*
* @brief An abstract base class for Transport Property
*
* This class provides an abstract interface and holds minimal info
* on which the Transport Caching scheme is based on. Concrete
* connection properties can be got by inheriting from this class and
* implementing the virtual functions.
* Note 1: Additional properties for connection like Qos,
* Priority that the RT folks would need, can be added by
* inheriting from this class and providing the following
* methods.
* 1. duplicate ()
* 2. is_equivalent ()
* 3. hash ()
*/
class TAO_Export TAO_Transport_Descriptor_Interface
{
public:
/// Destructor
virtual ~TAO_Transport_Descriptor_Interface ();
/// This call allocates and copies the contents of this class and
/// returns the pointer
virtual TAO_Transport_Descriptor_Interface *duplicate () = 0;
/// Try to determine if this object is same as the @a other_prop.
virtual CORBA::Boolean is_equivalent (
const TAO_Transport_Descriptor_Interface *other_prop) = 0;
/// Generate hash value for our class
virtual u_long hash () const = 0;
/// Return the underlying endpoint object
TAO_Endpoint *endpoint ();
/// Reset the endpoint pointer to point to another, if that one is
/// part of the chain based by the current endpoint. Although this
/// method is public it should only be used by the protocol specific
/// connector, right before caching, and only when a parallel
/// connect was attempted with more than one possible endpoints.
CORBA::Boolean reset_endpoint (TAO_Endpoint *ep);
/// Set the BiDir flag
void set_bidir_flag (CORBA::Boolean flag);
protected:
/// Default Constructor
TAO_Transport_Descriptor_Interface ();
/// Constructor
TAO_Transport_Descriptor_Interface (TAO_Endpoint *endpoint,
CORBA::Boolean take_ownership = false);
/// The base property of the connection ie. the peer's endpoint
TAO_Endpoint *endpoint_;
/// Should the endpoint be used in either direction?
CORBA::Boolean bidir_flag_;
/// Is the endpoint allocated on the heap? If so, we will have to
/// delete it when we destruct ourselves.
CORBA::Boolean release_;
};
TAO_END_VERSIONED_NAMESPACE_DECL
#if defined (__ACE_INLINE__)
# include "tao/Transport_Descriptor_Interface.inl"
#endif /* __ACE_INLINE__ */
#include /**/ "ace/post.h"
#endif /*TAO_CONNECTION_DESCRIPTOR_INTERFACE_H*/
|