#include <UIOP_Endpoint.h>
Inheritance diagram for TAO_UIOP_Endpoint:
Public Member Functions | |
TAO_UIOP_Endpoint (void) | |
Default constructor. | |
TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr, CORBA::Short priority=TAO_INVALID_PRIORITY) | |
Constructor. | |
~TAO_UIOP_Endpoint (void) | |
Destructor. | |
const ACE_UNIX_Addr & | object_addr (void) const |
Return a reference to the <object_addr>. | |
const char * | rendezvous_point (void) const |
TAO_Endpoint Methods | |
virtual TAO_Endpoint * | next (void) |
virtual int | addr_to_string (char *buffer, size_t length) |
virtual TAO_Endpoint * | duplicate (void) |
CORBA::Boolean | is_equivalent (const TAO_Endpoint *other_endpoint) |
virtual CORBA::ULong | hash (void) |
Return a hash value for this object. | |
Private Attributes | |
ACE_UNIX_Addr | object_addr_ |
TAO_UIOP_Endpoint * | next_ |
Friends | |
class | TAO_UIOP_Profile |
UIOP-specific implementation of PP Framework Endpoint interface.
Definition at line 40 of file UIOP_Endpoint.h.
TAO_UIOP_Endpoint::TAO_UIOP_Endpoint | ( | void | ) |
Default constructor.
Definition at line 31 of file UIOP_Endpoint.cpp.
00032 : TAO_Endpoint (TAO_TAG_UIOP_PROFILE) 00033 , object_addr_ () 00034 , next_ (0) 00035 { 00036 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_UIOP_Endpoint::TAO_UIOP_Endpoint | ( | const ACE_UNIX_Addr & | addr, | |
CORBA::Short | priority = TAO_INVALID_PRIORITY | |||
) |
Constructor.
Definition at line 23 of file UIOP_Endpoint.cpp.
00025 : TAO_Endpoint (TAO_TAG_UIOP_PROFILE, priority) 00026 , object_addr_ (addr) 00027 , next_ (0) 00028 { 00029 }
TAO_UIOP_Endpoint::~TAO_UIOP_Endpoint | ( | void | ) |
int TAO_UIOP_Endpoint::addr_to_string | ( | char * | buffer, | |
size_t | length | |||
) | [virtual] |
Implements TAO_Endpoint.
Definition at line 43 of file UIOP_Endpoint.cpp.
References ACE_OS::strcpy(), and ACE_OS::strlen().
00044 { 00045 if (length < (ACE_OS::strlen (this->rendezvous_point ()) + 1)) 00046 return -1; 00047 00048 ACE_OS::strcpy (buffer, this->rendezvous_point ()); 00049 00050 return 0; 00051 }
TAO_Endpoint * TAO_UIOP_Endpoint::duplicate | ( | void | ) | [virtual] |
Implements TAO_Endpoint.
Definition at line 60 of file UIOP_Endpoint.cpp.
References ACE_NEW_RETURN.
00061 { 00062 TAO_UIOP_Endpoint *endpoint = 0; 00063 ACE_NEW_RETURN (endpoint, 00064 TAO_UIOP_Endpoint (this->object_addr_, 00065 this->priority ()), 00066 0); 00067 00068 return endpoint; 00069 }
CORBA::ULong TAO_UIOP_Endpoint::hash | ( | void | ) | [virtual] |
Return a hash value for this object.
Implements TAO_Endpoint.
Definition at line 86 of file UIOP_Endpoint.cpp.
References ACE_GUARD_RETURN, ACE::hash_pjw(), TAO_Endpoint::hash_val_, and TAO_SYNCH_MUTEX.
00087 { 00088 if (this->hash_val_ != 0) 00089 return this->hash_val_; 00090 00091 { 00092 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, 00093 guard, 00094 this->addr_lookup_lock_, 00095 this->hash_val_); 00096 // .. DCL 00097 if (this->hash_val_ != 0) 00098 return this->hash_val_; 00099 00100 this->hash_val_ = 00101 ACE::hash_pjw (this->rendezvous_point ()); 00102 } 00103 00104 return this->hash_val_; 00105 }
CORBA::Boolean TAO_UIOP_Endpoint::is_equivalent | ( | const TAO_Endpoint * | other_endpoint | ) | [virtual] |
Return true if this endpoint is equivalent to <other_endpoint>. Two endpoints are equivalent iff their rendezvous points are the same.
Implements TAO_Endpoint.
Definition at line 72 of file UIOP_Endpoint.cpp.
References ACE_OS::strcmp().
00073 { 00074 TAO_Endpoint *endpt = const_cast<TAO_Endpoint *> (other_endpoint); 00075 00076 TAO_UIOP_Endpoint *endpoint = dynamic_cast<TAO_UIOP_Endpoint *> (endpt); 00077 00078 if (endpoint == 0) 00079 return 0; 00080 00081 return ACE_OS::strcmp (this->rendezvous_point (), 00082 endpoint->rendezvous_point ()) == 0; 00083 }
TAO_Endpoint * TAO_UIOP_Endpoint::next | ( | void | ) | [virtual] |
Implements TAO_Endpoint.
Definition at line 54 of file UIOP_Endpoint.cpp.
References next_.
00055 { 00056 return this->next_; 00057 }
const ACE_UNIX_Addr& TAO_UIOP_Endpoint::object_addr | ( | void | ) | const |
Return a reference to the <object_addr>.
Referenced by TAO_UIOP_Acceptor::is_collocated(), TAO_UIOP_Connector::make_connection(), and TAO_UIOP_Connector::set_validate_endpoint().
const char* TAO_UIOP_Endpoint::rendezvous_point | ( | void | ) | const |
Return a pointer to the rendezvous point string. This object maintains ownership of the returned string.
Referenced by TAO_UIOP_Connector::make_connection().
friend class TAO_UIOP_Profile [friend] |
Definition at line 44 of file UIOP_Endpoint.h.
TAO_UIOP_Endpoint* TAO_UIOP_Endpoint::next_ [private] |
UIOP Endpoints can be stringed into a list. Return the next endpoint in the list, if any.
Definition at line 93 of file UIOP_Endpoint.h.
Referenced by TAO_UIOP_Profile::add_endpoint(), TAO_UIOP_Profile::do_is_equivalent(), and next().
ACE_UNIX_Addr TAO_UIOP_Endpoint::object_addr_ [private] |
Cached instance of <ACE_UNIX_Addr> for use in making invocations, etc.
Definition at line 89 of file UIOP_Endpoint.h.