diff options
Diffstat (limited to 'TAO/tao/IIOP_Profile.h')
-rw-r--r-- | TAO/tao/IIOP_Profile.h | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/TAO/tao/IIOP_Profile.h b/TAO/tao/IIOP_Profile.h index 85ef98434ed..c0b43377418 100644 --- a/TAO/tao/IIOP_Profile.h +++ b/TAO/tao/IIOP_Profile.h @@ -45,9 +45,6 @@ public: DEF_IIOP_MINOR = 0 }; - static const char object_key_delimiter; - // The object key delimiter that IIOP uses or expects. - static const char *prefix (void); // Return the char string prefix. @@ -75,7 +72,7 @@ public: TAO_IIOP_Profile (const char *host, CORBA::UShort port, const TAO_ObjectKey &object_key, - const ACE_INET_Addr &addr); + const ACE_INET_Addr &addr); // Profile constructor, this is the most efficient since it // doesn't require any address resolution processing. @@ -111,6 +108,15 @@ public: ~TAO_IIOP_Profile (void); // Destructor is to be called only through <_decr_refcnt>. + CORBA::ULong tag (void) const; + // The tag, each concrete class will have a specific tag value. for + // example we are TAO_IOP_TAG_INTERNET_IOP. + + int parse (TAO_InputCDR& cdr, + CORBA::Boolean& continue_decoding, + CORBA::Environment &env); + // Initialize this object using the given CDR octet string. + int parse_string (const char *string, CORBA::Environment &env); // Initialize this object using the given input string. @@ -122,9 +128,6 @@ public: const TAO_opaque& body (void) const; // Create IIOP_Profile Object from marshalled data. - int decode (TAO_InputCDR& cdr); - // Initialize this object using the given CDR octet string. - virtual int encode (TAO_OutputCDR &stream) const; // Encode this profile in a stream, i.e. marshal it. @@ -134,9 +137,15 @@ public: TAO_ObjectKey &object_key (TAO_ObjectKey& objkey); // @@ deprecated. set the Object Key. - TAO_ObjectKey *_key (CORBA::Environment &env) const; + TAO_ObjectKey *_key (CORBA::Environment &env); // Return a pointer to the Object Key. + virtual void forward_to (TAO_MProfile *mprofiles); + // Client object will assume ownership for this object!! + + virtual TAO_MProfile *forward_to (void); + // copy of MProfile, user must delete. + CORBA::Boolean is_equivalent (TAO_Profile *other_profile, CORBA::Environment &env); // Return true if this profile is equivalent to other_profile. Two @@ -187,10 +196,22 @@ public: TAO_IIOP_Profile &operator= (const TAO_IIOP_Profile &src); // Copy operator. + virtual CORBA::ULong _incr_refcnt (void); + // Increase the reference count by one on this object. + + virtual CORBA::ULong _decr_refcnt (void); + // Decrement the object's reference count. When this count goes to + // 0 this object will be deleted. + private: int set (const ACE_INET_Addr &addr); // helper method to set the INET_Addr. + virtual TAO_MProfile *forward_to_i (void); + // reference to the TAO_MProfile which the current profile was + // forwarded to. This object keeps ownership. Note that this + // method is NOT thread-safe, so it must be called with locks held. + void create_body (void); // Does the work for <add_profile>. @@ -202,6 +223,9 @@ private: CORBA::UShort port_; // TCP port number + CORBA::ULong tag_; + // The tag. + TAO_opaque body_; // Marshaled profile (CDR). @@ -218,6 +242,15 @@ private: TAO_Client_Connection_Handler *hint_; // Pointer to a connection handler which we successfully used // already. + + ACE_SYNCH_MUTEX refcount_lock_; + // Mutex to protect reference count. + + CORBA::ULong refcount_; + // Number of outstanding references to this object. + + TAO_MProfile *forward_to_; + // list of profiles which we should try forwarding on. }; #if defined (__ACE_INLINE__) |