summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Profile.h
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-09-14 01:06:54 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-09-14 01:06:54 +0000
commit4898cebc78bfce27fe3b997fea910ed64c7dd2ee (patch)
tree59f279bfc60cf691e661531940d1d2c7c12255d5 /TAO/tao/IIOP_Profile.h
parent9fd348781e6e9d32473d112d6801a8e44ccd23c3 (diff)
downloadATCD-4898cebc78bfce27fe3b997fea910ed64c7dd2ee.tar.gz
ChangeLogTag:Wed Sep 13 19:15:01 2000 Marina Spivak <marina@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/IIOP_Profile.h')
-rw-r--r--TAO/tao/IIOP_Profile.h78
1 files changed, 27 insertions, 51 deletions
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 <host_> 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 <cdr>
- 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 <ACE_INET_Addr> 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