TAO_UIOP_Endpoint Class Reference

TAO_UIOP_Endpoint. More...

#include <UIOP_Endpoint.h>

Inheritance diagram for TAO_UIOP_Endpoint:

Inheritance graph
[legend]
Collaboration diagram for TAO_UIOP_Endpoint:

Collaboration graph
[legend]
List of all members.

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_Addrobject_addr (void) const
 Return a reference to the .

const char * rendezvous_point (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)
virtual CORBA::ULong hash (void)
 Return a hash value for this object.


Private Attributes

ACE_UNIX_Addr object_addr_
TAO_UIOP_Endpointnext_

Friends

class TAO_UIOP_Profile

Detailed Description

TAO_UIOP_Endpoint.

UIOP-specific implementation of PP Framework Endpoint interface.

Definition at line 40 of file UIOP_Endpoint.h.


Constructor & Destructor Documentation

TAO_UIOP_Endpoint::TAO_UIOP_Endpoint void   ) 
 

Default constructor.

Definition at line 31 of file UIOP_Endpoint.cpp.

References TAO_TAG_UIOP_PROFILE.

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.

References TAO_TAG_UIOP_PROFILE.

00025   : TAO_Endpoint (TAO_TAG_UIOP_PROFILE, priority)
00026     , object_addr_ (addr)
00027     , next_ (0)
00028 {
00029 }

TAO_UIOP_Endpoint::~TAO_UIOP_Endpoint void   ) 
 

Destructor.

Definition at line 38 of file UIOP_Endpoint.cpp.

00039 {
00040 }


Member Function Documentation

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(), and TAO_SYNCH_MUTEX.

Referenced by TAO_UIOP_Profile::hash().

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 . Two endpoints are equivalent iff their rendezvous points are the same.

Implements TAO_Endpoint.

Definition at line 72 of file UIOP_Endpoint.cpp.

References rendezvous_point(), and ACE_OS::strcmp().

Referenced by TAO_UIOP_Profile::do_is_equivalent().

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.

00055 {
00056   return this->next_;
00057 }

const ACE_UNIX_Addr& TAO_UIOP_Endpoint::object_addr void   )  const
 

Return a reference to the .

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_Profile::encode_endpoints(), is_equivalent(), and TAO_UIOP_Connector::make_connection().


Friends And Related Function Documentation

friend class TAO_UIOP_Profile [friend]
 

Definition at line 44 of file UIOP_Endpoint.h.


Member Data Documentation

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(), TAO_UIOP_Profile::encode_endpoints(), and TAO_UIOP_Profile::hash().

ACE_UNIX_Addr TAO_UIOP_Endpoint::object_addr_ [private]
 

Cached instance of for use in making invocations, etc.

Definition at line 89 of file UIOP_Endpoint.h.

Referenced by TAO_UIOP_Profile::decode_endpoints(), TAO_UIOP_Profile::decode_profile(), and TAO_UIOP_Profile::parse_string_i().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:42:11 2006 for TAO_Strategies by doxygen 1.3.6