#include <Endpoint.h>
Inheritance diagram for TAO_Endpoint:
TAO_Endpoint Template Methods | |
Abstract methods to be implemented by concrete subclasses. | |
virtual CORBA::Boolean | is_equivalent (const TAO_Endpoint *other_endpoint)=0 |
virtual TAO_Endpoint * | next (void)=0 |
Endpoints can be linked in a list. | |
virtual TAO_Endpoint * | next_filtered (TAO_ORB_Core *, TAO_Endpoint *root) |
virtual int | addr_to_string (char *buffer, size_t length)=0 |
Return a string representation for the address. | |
virtual TAO_Endpoint * | duplicate (void)=0 |
virtual CORBA::ULong | hash (void)=0 |
Return a hash value for this object. | |
TAO_SYNCH_MUTEX | addr_lookup_lock_ |
Lock for the address lookup. | |
CORBA::ULong | hash_val_ |
Cache the hash value. | |
CORBA::ULong const | tag_ |
CORBA::Short | priority_ |
TAO_Endpoint (const TAO_Endpoint &) | |
Endpoints should not be copied. | |
void | operator= (const TAO_Endpoint &) |
Public Member Functions | |
TAO_Endpoint (CORBA::ULong tag, CORBA::Short priority=TAO_INVALID_PRIORITY) | |
Constructor. | |
virtual | ~TAO_Endpoint (void) |
Destructor. | |
CORBA::ULong | tag (void) const |
IOP protocol tag accessor. | |
void | priority (CORBA::Short priority) |
<priority_> attribute setter. | |
CORBA::Short | priority (void) const |
<priority_> attribute getter. |
Lightweight encapsulation of addressing information for a single acceptor endpoint. In other words, Endpoint represents a single point of contact for the server, and is the smallest unit of addressing information necessary for a client to connect to a server. A Profile contains one or more Endpoints, i.e., knows of one or more ways to contact server(s).
Definition at line 54 of file Endpoint.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_Endpoint::TAO_Endpoint | ( | CORBA::ULong | tag, | |
CORBA::Short | priority = TAO_INVALID_PRIORITY | |||
) |
Constructor.
Definition at line 8 of file Endpoint.inl.
00010 : addr_lookup_lock_ () 00011 // @@ Would be a tragedy if the hash value of this endpoint is 0, in 00012 // which case this optimizaton wouldn't work. We can get around 00013 // that using a bool. But we don't want to increase the runtime 00014 // memory. 00015 , hash_val_ (0) 00016 , tag_ (tag) 00017 , priority_ (priority) 00018 00019 { 00020 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Endpoint::~TAO_Endpoint | ( | void | ) | [virtual] |
TAO_Endpoint::TAO_Endpoint | ( | const TAO_Endpoint & | ) | [private] |
Endpoints should not be copied.
virtual int TAO_Endpoint::addr_to_string | ( | char * | buffer, | |
size_t | length | |||
) | [pure virtual] |
Return a string representation for the address.
The purpose of this method is to provide a general interface to the underlying address object's addr_to_string
method. This allows the protocol implementor to select the appropriate string format.
Implemented in TAO_IIOP_Endpoint.
virtual TAO_Endpoint* TAO_Endpoint::duplicate | ( | void | ) | [pure virtual] |
This method returns a deep copy of the corresponding endpoints by allocating memory.
Implemented in TAO_IIOP_Endpoint.
Referenced by TAO_Base_Transport_Property::duplicate().
virtual CORBA::ULong TAO_Endpoint::hash | ( | void | ) | [pure virtual] |
Return a hash value for this object.
Implemented in TAO_IIOP_Endpoint.
Referenced by TAO_Base_Transport_Property::hash().
virtual CORBA::Boolean TAO_Endpoint::is_equivalent | ( | const TAO_Endpoint * | other_endpoint | ) | [pure virtual] |
virtual TAO_Endpoint* TAO_Endpoint::next | ( | void | ) | [pure virtual] |
Endpoints can be linked in a list.
Implemented in TAO_IIOP_Endpoint.
Referenced by TAO_Acceptor_Registry::is_collocated(), next_filtered(), and TAO_IIOP_Profile::~TAO_IIOP_Profile().
TAO_Endpoint * TAO_Endpoint::next_filtered | ( | TAO_ORB_Core * | , | |
TAO_Endpoint * | root | |||
) | [virtual] |
Return the next endpoint in the list, but use protocol-specific filtering to constrain the value. The orb core is needed to supply any sort of filter arguments, and the root endpoint is needed in case the algorithm needs to rewind. If the supplied root is 0, then this is assumed to be the candidate next endpoint.
To use this, the caller starts off the change with root == 0. This is a bit of a violation in logic, a more correct implementation would accept this == 0 and a non-null root. To do iteration using next_filtered, do: for (TAO_Endpoint *ep = root_endpoint->next_filtered (orb_core, 0); ep != 0; ep = ep->next_filtered(orb_core, root_endpoint)) { }
Reimplemented in TAO_IIOP_Endpoint.
Definition at line 21 of file Endpoint.cpp.
References next().
Referenced by TAO_Profile::first_filtered_endpoint(), TAO_IIOP_Connector::make_parallel_connection(), TAO_Profile::next_filtered_endpoint(), and TAO_Connector::parallel_connect().
00022 { 00023 if (root == 0) 00024 return this; 00025 return this->next(); 00026 }
void TAO_Endpoint::operator= | ( | const TAO_Endpoint & | ) | [private] |
ACE_INLINE CORBA::Short TAO_Endpoint::priority | ( | void | ) | const |
<priority_> attribute getter.
Definition at line 29 of file Endpoint.inl.
References priority_.
00030 { 00031 return this->priority_; 00032 }
ACE_INLINE void TAO_Endpoint::priority | ( | CORBA::Short | priority | ) |
<priority_> attribute setter.
Definition at line 35 of file Endpoint.inl.
References priority_.
Referenced by TAO_IIOP_Acceptor::create_new_profile(), TAO_IIOP_Acceptor::create_shared_profile(), TAO_IIOP_Profile::decode_endpoints(), and TAO_IIOP_Profile::encode_endpoints().
00036 { 00037 this->priority_ = p; 00038 }
ACE_INLINE CORBA::ULong TAO_Endpoint::tag | ( | void | ) | const |
IOP protocol tag accessor.
Definition at line 23 of file Endpoint.inl.
References tag_.
Referenced by TAO_IIOP_Profile::encode_alternate_endpoints(), TAO_IIOP_Connector::remote_endpoint(), and TAO::Profile_Transport_Resolver::try_connect_i().
00024 { 00025 return this->tag_; 00026 }
TAO_SYNCH_MUTEX TAO_Endpoint::addr_lookup_lock_ [mutable, protected] |
Lock for the address lookup.
Definition at line 140 of file Endpoint.h.
CORBA::ULong TAO_Endpoint::hash_val_ [protected] |
Cache the hash value.
Definition at line 143 of file Endpoint.h.
Referenced by TAO_IIOP_Endpoint::hash().
CORBA::Short TAO_Endpoint::priority_ [protected] |
CORBA priority of the acceptor this Endpoint is representing. This is part of TAO 'prioritized endpoints' architecture, and is currently used for RTCORBA only.
Definition at line 154 of file Endpoint.h.
Referenced by priority().
CORBA::ULong const TAO_Endpoint::tag_ [protected] |
IOP tag, identifying the protocol for which this endpoint contains addressing info.
Definition at line 147 of file Endpoint.h.
Referenced by tag().