1 #include "tao/Strategies/UIOP_Endpoint.h"
2 #include "tao/Strategies/UIOP_Connection_Handler.h"
3 #include "tao/ORB_Constants.h"
4 #include "ace/OS_NS_string.h"
8 #if !defined (__ACE_INLINE__)
9 # include "tao/Strategies/UIOP_Endpoint.inl"
10 #endif /* __ACE_INLINE__ */
12 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 TAO_UIOP_Endpoint::TAO_UIOP_Endpoint (const ACE_UNIX_Addr
&addr
,
15 CORBA::Short priority
)
16 : TAO_Endpoint (TAO_TAG_UIOP_PROFILE
, priority
)
22 TAO_UIOP_Endpoint::TAO_UIOP_Endpoint ()
23 : TAO_Endpoint (TAO_TAG_UIOP_PROFILE
)
30 TAO_UIOP_Endpoint::addr_to_string (char *buffer
, size_t length
)
32 if (length
< (ACE_OS::strlen (this->rendezvous_point ()) + 1))
35 ACE_OS::strcpy (buffer
, this->rendezvous_point ());
41 TAO_UIOP_Endpoint::next ()
47 TAO_UIOP_Endpoint::duplicate ()
49 TAO_UIOP_Endpoint
*endpoint
= 0;
50 ACE_NEW_RETURN (endpoint
,
51 TAO_UIOP_Endpoint (this->object_addr_
,
59 TAO_UIOP_Endpoint::is_equivalent (const TAO_Endpoint
*other_endpoint
)
61 TAO_Endpoint
*endpt
= const_cast<TAO_Endpoint
*> (other_endpoint
);
63 TAO_UIOP_Endpoint
*endpoint
= dynamic_cast<TAO_UIOP_Endpoint
*> (endpt
);
68 return ACE_OS::strcmp (this->rendezvous_point (),
69 endpoint
->rendezvous_point ()) == 0;
73 TAO_UIOP_Endpoint::hash ()
75 if (this->hash_val_
!= 0)
76 return this->hash_val_
;
79 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX
,
81 this->addr_lookup_lock_
,
84 if (this->hash_val_
!= 0)
85 return this->hash_val_
;
88 ACE::hash_pjw (this->rendezvous_point ());
91 return this->hash_val_
;
94 TAO_END_VERSIONED_NAMESPACE_DECL
96 #endif /* TAO_HAS_UIOP == 1 */