From 50c8d9f1ec786bb9b03661e690e8571f9857f271 Mon Sep 17 00:00:00 2001 From: marina Date: Thu, 14 Sep 2000 01:06:54 +0000 Subject: ChangeLogTag:Wed Sep 13 19:15:01 2000 Marina Spivak --- TAO/tao/IIOP_Profile.h | 78 +++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 51 deletions(-) (limited to 'TAO/tao/IIOP_Profile.h') diff --git a/TAO/tao/IIOP_Profile.h b/TAO/tao/IIOP_Profile.h index 3b494267d34..2ea538063c7 100644 --- a/TAO/tao/IIOP_Profile.h +++ b/TAO/tao/IIOP_Profile.h @@ -23,16 +23,15 @@ #include "ace/pre.h" #include "tao/Profile.h" -#include "tao/GIOP_Message_State.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/ORB.h" #include "tao/Object_KeyC.h" +#include "tao/IIOP_Endpoint.h" #include "ace/Synch.h" -#include "ace/INET_Addr.h" +//#include "ace/INET_Addr.h" class TAO_IIOP_Client_Connection_Handler; @@ -82,15 +81,24 @@ public: ~TAO_IIOP_Profile (void); // Destructor is to be called only through <_decr_refcnt>. + virtual TAO_Endpoint *endpoint (void); + // Head of the list of endpoints for this profile. + + void add_endpoint (TAO_IIOP_Endpoint *endp); + // + int parse_string (const char *string, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); // Initialize this object using the given input string. + // Url-style string contain only one endpoint. char * to_string (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); // Return a string representation for this profile. // client must deallocate memory. + // This is used to create url-style reference. Only one + // endpoint is included into the string. int decode (TAO_InputCDR& cdr); // Initialize this object using the given CDR octet string. @@ -112,71 +120,39 @@ public: CORBA::ULong hash (CORBA::ULong max, CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()); + TAO_default_environment ()); // Return a hash value for this object. - int addr_to_string (char *buffer, size_t length); - // Return a string representation for the address. - - const ACE_INET_Addr &object_addr (void) const; - // return a reference to the object_addr. - - const char *host (void) const; - // Return a pointer to the host string. This object maintains - // ownership of this string. - - const char *host (const char *h); - // Copy the string h into and return the resulting pointer. - // This object maintains ownership of this string. - - CORBA::UShort port (void) const; - // Return the port number. - - CORBA::UShort port (CORBA::UShort p); - // Set the port number. - - const TAO_GIOP_Version& version (void) const; - // Return a pointer to this profile's version. This object - // maintains ownership. - - TAO_IIOP_Client_Connection_Handler *&hint (void); - // This is a hint for which connection handler to use. - - void reset_hint (void); - // Reset the hint's value. - IOP::TaggedProfile &create_tagged_profile (void); // Please refer to Profile.h for the documentation of this // function. -private: - int set (const ACE_INET_Addr &addr); - // helper method to set the INET_Addr. - private: void create_profile_body (TAO_OutputCDR &cdr) const; // Creates a encapsultaion of the ProfileBody struct in the - CORBA::String_var host_; - // String representing the hosts name. + int encode_endpoints (void); + // Encodes endpoints from this profile into a tagged component. + + int decode_endpoints (void); + // Decodes endpoints of this profile from a tagged component. - CORBA::UShort port_; - // TCP port number + TAO_IIOP_Endpoint endpoint_; + // Head of the list of endpoints for this profile. - TAO_GIOP_Version version_; - // IIOP version number. + size_t count_; + // Number of endpoints this profile contains. + + int endpoints_encoded_; + // Flag indicating whether endpoints have already been encoded, + // saving us from repeatedly encoding them over and over. TAO_ObjectKey object_key_; // object_key associated with this profile. - ACE_INET_Addr object_addr_; - // Cached instance of for use in making - // invocations, etc. - - TAO_IIOP_Client_Connection_Handler *hint_; - // Pointer to a connection handler which we successfully used - // already. + TAO_ORB_Core *orb_core_; + // ORB Core. IOP::TaggedProfile tagged_profile_; // Our tagged profile -- cgit v1.2.1