TAO_COIOP_Endpoint Class Reference

TAO_COIOP_Endpoint. More...

#include <COIOP_Endpoint.h>

Inheritance diagram for TAO_COIOP_Endpoint:

Inheritance graph
[legend]
Collaboration diagram for TAO_COIOP_Endpoint:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_COIOP_Endpoint (void)
 Default constructor.

 TAO_COIOP_Endpoint (const ACE_Utils::UUID &uuid)
 ~TAO_COIOP_Endpoint (void)
 Destructor.

const ACE_Utils::UUIDuuid (void) const
TAO_Endpoint Methods
Please check the documentation in Endpoint.h for details.

virtual TAO_Endpointnext (void)
virtual int addr_to_string (char *buffer, size_t length)
virtual TAO_Endpointduplicate (void)
CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint)
CORBA::ULong hash (void)
 Return a hash value for this object.


Private Attributes

ACE_Utils::UUID uuid_
 UUID uniquely identifying this COIOP endpoint.

TAO_COIOP_Endpointnext_

Friends

class TAO_COIOP_Profile
class TAO_SSLIOP_Profile

Detailed Description

TAO_COIOP_Endpoint.

COIOP-specific implementation of PP Framework Endpoint interface.

Definition at line 43 of file COIOP_Endpoint.h.


Constructor & Destructor Documentation

TAO_COIOP_Endpoint::TAO_COIOP_Endpoint void   ) 
 

Default constructor.

Definition at line 36 of file COIOP_Endpoint.cpp.

References TAO_TAG_COIOP_PROFILE.

00037   : TAO_Endpoint (TAO_TAG_COIOP_PROFILE),
00038     uuid_ (),
00039     next_ (0)
00040 {
00041 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_COIOP_Endpoint::TAO_COIOP_Endpoint const ACE_Utils::UUID uuid  ) 
 

Constructor. This is the most efficient constructor since it does not require any address resolution processing.

Definition at line 29 of file COIOP_Endpoint.cpp.

References TAO_TAG_COIOP_PROFILE.

00030   : TAO_Endpoint (TAO_TAG_COIOP_PROFILE)
00031     , uuid_ (uuid)
00032     , next_ (0)
00033 {
00034 }

TAO_COIOP_Endpoint::~TAO_COIOP_Endpoint void   ) 
 

Destructor.

Definition at line 43 of file COIOP_Endpoint.cpp.

00044 {
00045 
00046 }


Member Function Documentation

int TAO_COIOP_Endpoint::addr_to_string char *  buffer,
size_t  length
[virtual]
 

Implements TAO_Endpoint.

Definition at line 49 of file COIOP_Endpoint.cpp.

References ACE_CString, ACE_OS::sprintf(), and ACE_Utils::UUID::to_string().

00050 {
00051   const ACE_CString *str = uuid_.to_string ();
00052   size_t const actual_len =
00053     str->length ();
00054 
00055   if (length < actual_len)
00056     return -1;
00057 
00058   ACE_OS::sprintf (buffer, "%s",
00059                    str->c_str());
00060 
00061   return 0;
00062 }

TAO_Endpoint * TAO_COIOP_Endpoint::duplicate void   )  [virtual]
 

Implements TAO_Endpoint.

Definition at line 71 of file COIOP_Endpoint.cpp.

References ACE_NEW_RETURN.

00072 {
00073   TAO_COIOP_Endpoint *endpoint = 0;
00074 
00075   ACE_NEW_RETURN (endpoint,
00076                   TAO_COIOP_Endpoint (this->uuid_),
00077                   0);
00078 
00079   return endpoint;
00080 }

CORBA::ULong TAO_COIOP_Endpoint::hash void   )  [virtual]
 

Return a hash value for this object.

Implements TAO_Endpoint.

Definition at line 95 of file COIOP_Endpoint.cpp.

References ACE_CString, ACE_GUARD_RETURN, TAO_SYNCH_MUTEX, and ACE_Utils::UUID::to_string().

Referenced by TAO_COIOP_Profile::hash().

00096 {
00097   if (this->hash_val_ != 0)
00098     return this->hash_val_;
00099 
00100   {
00101     ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
00102                       guard,
00103                       this->addr_lookup_lock_,
00104                       this->hash_val_);
00105     // .. DCL
00106     if (this->hash_val_ != 0)
00107       return this->hash_val_;
00108 
00109     const ACE_CString *stringval = this->uuid_.to_string ();
00110     this->hash_val_ =
00111       stringval->hash ();
00112   }
00113 
00114   return this->hash_val_;
00115 }

CORBA::Boolean TAO_COIOP_Endpoint::is_equivalent const TAO_Endpoint other_endpoint  )  [virtual]
 

Return true if this endpoint is equivalent to . Two endpoints are equivalent iff their port and host are the same.

Implements TAO_Endpoint.

Definition at line 83 of file COIOP_Endpoint.cpp.

References uuid_.

Referenced by TAO_COIOP_Profile::do_is_equivalent().

00084 {
00085   TAO_Endpoint *endpt = const_cast<TAO_Endpoint *> (other_endpoint);
00086 
00087   TAO_COIOP_Endpoint *endpoint = dynamic_cast<TAO_COIOP_Endpoint *> (endpt);
00088   if (endpoint == 0)
00089     return false;
00090 
00091   return (this->uuid_ == endpoint->uuid_);
00092 }

TAO_Endpoint * TAO_COIOP_Endpoint::next void   )  [virtual]
 

Implements TAO_Endpoint.

Definition at line 65 of file COIOP_Endpoint.cpp.

00066 {
00067   return 0;
00068 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE const ACE_Utils::UUID & TAO_COIOP_Endpoint::uuid void   )  const
 

Return a pointer to the host string. This object maintains ownership of this string.

Definition at line 8 of file COIOP_Endpoint.inl.

Referenced by TAO_COIOP_Acceptor::is_collocated().

00009 {
00010   return this->uuid_;
00011 }


Friends And Related Function Documentation

friend class TAO_COIOP_Profile [friend]
 

Definition at line 47 of file COIOP_Endpoint.h.

friend class TAO_SSLIOP_Profile [friend]
 

Definition at line 48 of file COIOP_Endpoint.h.


Member Data Documentation

TAO_COIOP_Endpoint* TAO_COIOP_Endpoint::next_ [private]
 

COIOP Endpoints can be stringed into a list. Return the next endpoint in the list, if any.

Definition at line 92 of file COIOP_Endpoint.h.

Referenced by TAO_COIOP_Profile::add_endpoint(), TAO_COIOP_Profile::do_is_equivalent(), TAO_COIOP_Profile::encode_endpoints(), and TAO_COIOP_Profile::hash().

ACE_Utils::UUID TAO_COIOP_Endpoint::uuid_ [mutable, private]
 

UUID uniquely identifying this COIOP endpoint.

Definition at line 88 of file COIOP_Endpoint.h.

Referenced by TAO_COIOP_Profile::create_profile_body(), TAO_COIOP_Profile::decode_profile(), TAO_COIOP_Profile::encode_endpoints(), is_equivalent(), TAO_COIOP_Profile::parse_string_i(), and TAO_COIOP_Profile::to_string().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 16:02:23 2008 for TAO_Strategies by doxygen 1.3.6