00001 // -*- C++ -*- 00002 00003 //========================================================================== 00004 /** 00005 * @file UIOP_Endpoint.h 00006 * 00007 * $Id: UIOP_Endpoint.h 73791 2006-07-27 20:54:56Z wotte $ 00008 * 00009 * UIOP implementation of PP Framework Endpoint interface. 00010 * 00011 * @author Marina Spivak <marina@cs.wustl.edu> 00012 */ 00013 //========================================================================== 00014 00015 #ifndef TAO_UIOP_ENDPOINT_H 00016 #define TAO_UIOP_ENDPOINT_H 00017 #include /**/ "ace/pre.h" 00018 00019 #include "tao/orbconf.h" 00020 00021 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00022 # pragma once 00023 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00024 00025 # if TAO_HAS_UIOP == 1 00026 00027 #include "tao/Strategies/strategies_export.h" 00028 #include "tao/Endpoint.h" 00029 #include "ace/UNIX_Addr.h" 00030 00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00032 00033 /** 00034 * @class TAO_UIOP_Endpoint 00035 * 00036 * @brief TAO_UIOP_Endpoint 00037 * 00038 * UIOP-specific implementation of PP Framework Endpoint interface. 00039 */ 00040 class TAO_Strategies_Export TAO_UIOP_Endpoint : public TAO_Endpoint 00041 { 00042 public: 00043 00044 friend class TAO_UIOP_Profile; 00045 00046 // = Initialization and termination methods. 00047 00048 /// Default constructor. 00049 TAO_UIOP_Endpoint (void); 00050 00051 /// Constructor. 00052 TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr, 00053 CORBA::Short priority = TAO_INVALID_PRIORITY); 00054 00055 /// Destructor. 00056 ~TAO_UIOP_Endpoint (void); 00057 00058 /** 00059 * @name TAO_Endpoint Methods 00060 * 00061 * Please check the documentation in Endpoint.h for details. 00062 */ 00063 //@{ 00064 virtual TAO_Endpoint *next (void); 00065 virtual int addr_to_string (char *buffer, size_t length); 00066 virtual TAO_Endpoint *duplicate (void); 00067 00068 /// Return true if this endpoint is equivalent to <other_endpoint>. Two 00069 /// endpoints are equivalent iff their rendezvous points are the same. 00070 CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint); 00071 00072 /// Return a hash value for this object. 00073 virtual CORBA::ULong hash (void); 00074 //@} 00075 00076 // = UIOP_Endpoint-specific methods. 00077 00078 /// Return a reference to the <object_addr>. 00079 const ACE_UNIX_Addr &object_addr (void) const; 00080 00081 /// Return a pointer to the rendezvous point string. 00082 /// This object maintains ownership of the returned string. 00083 const char *rendezvous_point (void) const; 00084 00085 private: 00086 00087 /// Cached instance of <ACE_UNIX_Addr> for use in making 00088 /// invocations, etc. 00089 ACE_UNIX_Addr object_addr_; 00090 00091 /// UIOP Endpoints can be stringed into a list. Return the next 00092 /// endpoint in the list, if any. 00093 TAO_UIOP_Endpoint *next_; 00094 }; 00095 00096 TAO_END_VERSIONED_NAMESPACE_DECL 00097 00098 #if defined (__ACE_INLINE__) 00099 # include "tao/Strategies/UIOP_Endpoint.inl" 00100 #endif /* __ACE_INLINE__ */ 00101 00102 # endif /* TAO_HAS_UIOP == 1 */ 00103 00104 #include /**/ "ace/post.h" 00105 #endif /* TAO_UIOP_ENDPOINT_H */