3 // ===================================================================
5 * @file Transport_Descriptor_Interface.h
7 * @author Bala Natarajan <bala@cs.wustl.edu>
9 // ===================================================================
11 #ifndef TAO_CONNECTION_DESCRIPTOR_INTERFACE_H
12 #define TAO_CONNECTION_DESCRIPTOR_INTERFACE_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Basic_Types.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @class TAO_Transport_Descriptor_Interface
31 * @brief An abstract base class for Transport Property
33 * This class provides an abstract interface and holds minimal info
34 * on which the Transport Caching scheme is based on. Concrete
35 * connection properties can be got by inheriting from this class and
36 * implementing the virtual functions.
37 * Note 1: Additional properties for connection like Qos,
38 * Priority that the RT folks would need, can be added by
39 * inheriting from this class and providing the following
45 class TAO_Export TAO_Transport_Descriptor_Interface
49 virtual ~TAO_Transport_Descriptor_Interface ();
51 /// This call allocates and copies the contents of this class and
52 /// returns the pointer
53 virtual TAO_Transport_Descriptor_Interface
*duplicate () = 0;
55 /// Try to determine if this object is same as the @a other_prop.
56 virtual CORBA::Boolean
is_equivalent (
57 const TAO_Transport_Descriptor_Interface
*other_prop
) = 0;
59 /// Generate hash value for our class
60 virtual u_long
hash () const = 0;
62 /// Return the underlying endpoint object
63 TAO_Endpoint
*endpoint ();
65 /// Reset the endpoint pointer to point to another, if that one is
66 /// part of the chain based by the current endpoint. Although this
67 /// method is public it should only be used by the protocol specific
68 /// connector, right before caching, and only when a parallel
69 /// connect was attempted with more than one possible endpoints.
70 CORBA::Boolean
reset_endpoint (TAO_Endpoint
*ep
);
72 /// Set the BiDir flag
73 void set_bidir_flag (CORBA::Boolean flag
);
76 /// Default Constructor
77 TAO_Transport_Descriptor_Interface ();
80 TAO_Transport_Descriptor_Interface (TAO_Endpoint
*endpoint
,
81 CORBA::Boolean take_ownership
= false);
83 /// The base property of the connection ie. the peer's endpoint
84 TAO_Endpoint
*endpoint_
;
86 /// Should the endpoint be used in either direction?
87 CORBA::Boolean bidir_flag_
;
89 /// Is the endpoint allocated on the heap? If so, we will have to
90 /// delete it when we destruct ourselves.
91 CORBA::Boolean release_
;
94 TAO_END_VERSIONED_NAMESPACE_DECL
96 #if defined (__ACE_INLINE__)
97 # include "tao/Transport_Descriptor_Interface.inl"
98 #endif /* __ACE_INLINE__ */
100 #include /**/ "ace/post.h"
102 #endif /*TAO_CONNECTION_DESCRIPTOR_INTERFACE_H*/