Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Profile Class Reference

Defines the Profile interface. More...

#include <Profile.h>

Inheritance diagram for TAO_Profile:

Inheritance graph
[legend]
Collaboration diagram for TAO_Profile:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Profile (CORBA::ULong tag, TAO_ORB_Core *orb_core, const TAO_GIOP_Message_Version &version)
 Constructor. More...

virtual ~TAO_Profile (void)
 If you have a virtual method you need a virtual dtor. More...

CORBA::ULong tag (void) const
 The tag, each concrete class will have a specific tag value. More...

const TAO_GIOP_Message_Versionversion (void) const
 Return a pointer to this profile's version. This object maintains ownership. More...

TAO_ORB_Coreorb_core (void) const
 Get a pointer to the <TAO_ORB_Core>. More...

CORBA::ULong _incr_refcnt (void)
 Increase the reference count by one on this object. More...

CORBA::ULong _decr_refcnt (void)
 Decrement the object's reference count. When this count goes to 0 this object will be deleted. More...

void forward_to (TAO_MProfile *mprofiles)
 Keep a pointer to the forwarded profile. More...

TAO_MProfileforward_to (void)
 MProfile accessor. More...

const TAO_Tagged_Componentstagged_components (void) const
 Access the tagged components, notice that they they could be empty (or ignored) for non-GIOP protocols (and even for GIOP-1.0). More...

TAO_Tagged_Componentstagged_components (void)
void add_tagged_component (const IOP::TaggedComponent &component ACE_ENV_ARG_DECL)
 Add the given tagged component to the profile. More...

virtual char object_key_delimiter (void) const=0
 The object key delimiter. More...

virtual void parse_string (const char *string ACE_ENV_ARG_DECL)=0
 Initialize this object using the given input string. Supports URL style of object references. More...

virtual char * to_string (ACE_ENV_SINGLE_ARG_DECL)=0
 Return a string representation for this profile. client must deallocate memory. More...

virtual int decode (TAO_InputCDR &cdr)=0
 Initialize this object using the given CDR octet string. More...

virtual int encode (TAO_OutputCDR &stream) const=0
 Encode this profile in a stream, i.e. marshal it. More...

virtual int encode_endpoints (void)=0
 Encodes this profile's endpoints into a tagged component. More...

virtual const TAO_ObjectKeyobject_key (void) const=0
 deprecated. return a reference to the Object Key. More...

virtual TAO_ObjectKey_key (void) const=0
 Obtain the object key, return 0 if the profile cannot be parsed. The memory is owned by the caller! More...

virtual TAO_Endpointendpoint (void)=0
 Return pointer to this profile's endpoint. More...

virtual size_t endpoint_count (void)=0
 Return how many endpoints this profile contains. More...

virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile)=0
 Return true if this profile is equivalent to other_profile. More...

virtual CORBA::ULong hash (CORBA::ULong max ACE_ENV_ARG_DECL)=0
 Return a hash value for this object. More...

virtual IOP::TaggedProfilecreate_tagged_profile (void)=0
 This method is used to get the IOP::TaggedProfile. More...

virtual void policies (CORBA::PolicyList *policy_list ACE_ENV_ARG_DECL)
 This method sets the client exposed policies, i.e., the ones propagated in the IOR, for this profile. More...

virtual CORBA::PolicyListpolicies (ACE_ENV_SINGLE_ARG_DECL)
 Accessor for the client exposed policies of this profile. More...

virtual void the_stub (TAO_Stub *stub)
 Sets the TAO_Stub to which this profile is associated. More...

virtual TAO_Stubthe_stub (void)
 Gets the TAO_MProfile that holds the TAO_Profile instance. More...

virtual int supports_multicast (void) const
 Returns true if this profile can specify multicast endpoints. More...

virtual void addressing_mode (CORBA::Short addr_mode ACE_ENV_ARG_DECL)
 Set the addressing mode if a remote servant replies with an addressing mode exception. More...

CORBA::Short addressing_mode (void) const
 Return the current addressing mode for this profile. More...


Protected Attributes

TAO_GIOP_Message_Version version_
 IIOP version number. More...

TAO_Tagged_Components tagged_components_
 The tagged components. More...

CORBA::Boolean are_policies_parsed_
 Flag indicating whether the lazy decoding of the client exposed policies has taken place. More...

TAO_Stubstub_
 Pointer to the TAO_Stub to which this profile is related. More...

CORBA::PolicyListpolicy_list_
 Client exposed policies of this profile. More...

CORBA::Short addressing_mode_
 The current addressing mode. This may be changed if a remote server sends back an address mode exception. More...


Private Methods

TAO_MProfileforward_to_i (void)
 this object keeps ownership of this object. More...

void verify_orb_configuration (ACE_ENV_SINGLE_ARG_DECL)
 Verify that the current ORB's configuration supports tagged components in IORs. More...

void verify_profile_version (ACE_ENV_SINGLE_ARG_DECL)
 Verify that the given profile supports tagged components, i.e. is not a GIOP 1.0 profile. More...

 TAO_Profile (const TAO_Profile &)
void operator= (const TAO_Profile &)

Private Attributes

CORBA::ULong tag_
 IOP protocol tag. More...

TAO_ORB_Coreorb_core_
 Pointer to the ORB core. More...

TAO_MProfileforward_to_
 the TAO_MProfile which contains the profiles for the forwarded object. More...

TAO_SYNCH_MUTEX refcount_lock_
 Mutex to protect reference count. More...

CORBA::ULong refcount_
 Number of outstanding references to this object. More...


Detailed Description

Defines the Profile interface.

An abstract base class for representing object location information. This is based on the CORBA IOR definitions.


Constructor & Destructor Documentation

ACE_INLINE TAO_Profile::TAO_Profile CORBA::ULong    tag,
TAO_ORB_Core   orb_core,
const TAO_GIOP_Message_Version   version
 

Constructor.

TAO_Profile::~TAO_Profile void    [virtual]
 

If you have a virtual method you need a virtual dtor.

TAO_Profile::TAO_Profile const TAO_Profile &    [private]
 


Member Function Documentation

ACE_INLINE CORBA::ULong TAO_Profile::_decr_refcnt void   
 

Decrement the object's reference count. When this count goes to 0 this object will be deleted.

ACE_INLINE CORBA::ULong TAO_Profile::_incr_refcnt void   
 

Increase the reference count by one on this object.

virtual TAO_ObjectKey* TAO_Profile::_key void    const [pure virtual]
 

Obtain the object key, return 0 if the profile cannot be parsed. The memory is owned by the caller!

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

void TAO_Profile::add_tagged_component const IOP::TaggedComponent &component    ACE_ENV_ARG_DECL
 

Add the given tagged component to the profile.

ACE_INLINE CORBA::Short TAO_Profile::addressing_mode void    const
 

Return the current addressing mode for this profile.

In almost all cases, this is TAO_Target_Specification::Key_Addr.

virtual void TAO_Profile::addressing_mode CORBA::Short addr_mode    ACE_ENV_ARG_DECL [virtual]
 

Set the addressing mode if a remote servant replies with an addressing mode exception.

If this profile doesn't support a particular addressing mode, this method needs to be overridden signal the appropriate error.

** RACE CONDITION NOTE **

Currently, getting and setting the addressing mode is not protected by a mutex. Theoretically, this could cause a race condition if one thread sends a request, then gets an exception from the remote servant to change the addressing mode, and then another thread sends a different request to the same servant using the wrong addressing mode. The result of this is that we'll get another address change exception. (Annoying, but not that bad.)

In practice at the current time, the above theoretical case never happens since the target specification always uses the object key except for MIOP requests. Remote ORBs can't respond to MIOP requests even to send exceptions, so even in this case, the race condition can't happen.

Therefore, for the time being, there is no lock to protect the addressing mode. Given that the addressing mode is checked in the critical path, this decision seems like a good thing.

virtual IOP::TaggedProfile& TAO_Profile::create_tagged_profile void    [pure virtual]
 

This method is used to get the IOP::TaggedProfile.

The profile information that is received from the server side would have already been decoded. So this method will just make a IOP::TaggedProfile struct from the existing information and return the reference to that. This method is necessary for GIOP 1.2.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual int TAO_Profile::decode TAO_InputCDR   cdr [pure virtual]
 

Initialize this object using the given CDR octet string.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual int TAO_Profile::encode TAO_OutputCDR   stream const [pure virtual]
 

Encode this profile in a stream, i.e. marshal it.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual int TAO_Profile::encode_endpoints void    [pure virtual]
 

Encodes this profile's endpoints into a tagged component.

This is done only if RTCORBA is enabled, since currently this is the only case when we have more than one endpoint per profile.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual TAO_Endpoint* TAO_Profile::endpoint void    [pure virtual]
 

Return pointer to this profile's endpoint.

If the profile contains more than one endpoint, i.e., a list, the method returns the head of the list.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual size_t TAO_Profile::endpoint_count void    [pure virtual]
 

Return how many endpoints this profile contains.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

ACE_INLINE TAO_MProfile * TAO_Profile::forward_to void   
 

MProfile accessor.

ACE_INLINE void TAO_Profile::forward_to TAO_MProfile   mprofiles
 

Keep a pointer to the forwarded profile.

ACE_INLINE TAO_MProfile * TAO_Profile::forward_to_i void    [private]
 

this object keeps ownership of this object.

virtual CORBA::ULong TAO_Profile::hash CORBA::ULong max    ACE_ENV_ARG_DECL_NOT_USED [pure virtual]
 

Return a hash value for this object.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual CORBA::Boolean TAO_Profile::is_equivalent const TAO_Profile *    other_profile [pure virtual]
 

Return true if this profile is equivalent to other_profile.

Two profiles are equivalent iff their tag, object_key, version and all endpoints are the same.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual const TAO_ObjectKey& TAO_Profile::object_key void    const [pure virtual]
 

deprecated. return a reference to the Object Key.

@

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

virtual char TAO_Profile::object_key_delimiter void    const [pure virtual]
 

The object key delimiter.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

void TAO_Profile::operator= const TAO_Profile &    [private]
 

ACE_INLINE TAO_ORB_Core * TAO_Profile::orb_core void    const
 

Get a pointer to the <TAO_ORB_Core>.

virtual void TAO_Profile::parse_string const char *string    ACE_ENV_ARG_DECL [pure virtual]
 

Initialize this object using the given input string. Supports URL style of object references.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

CORBA::PolicyList & TAO_Profile::policies ACE_ENV_SINGLE_ARG_DECL    [virtual]
 

Accessor for the client exposed policies of this profile.

void TAO_Profile::policies CORBA::PolicyList *policy_list    ACE_ENV_ARG_DECL [virtual]
 

This method sets the client exposed policies, i.e., the ones propagated in the IOR, for this profile.

int TAO_Profile::supports_multicast void    const [virtual]
 

Returns true if this profile can specify multicast endpoints.

ACE_INLINE CORBA::ULong TAO_Profile::tag void    const
 

The tag, each concrete class will have a specific tag value.

ACE_INLINE TAO_Tagged_Components & TAO_Profile::tagged_components void   
 

ACE_INLINE const TAO_Tagged_Components & TAO_Profile::tagged_components void    const
 

Access the tagged components, notice that they they could be empty (or ignored) for non-GIOP protocols (and even for GIOP-1.0).

TAO_Stub * TAO_Profile::the_stub void    [virtual]
 

Gets the TAO_MProfile that holds the TAO_Profile instance.

void TAO_Profile::the_stub TAO_Stub   stub [virtual]
 

Sets the TAO_Stub to which this profile is associated.

virtual char* TAO_Profile::to_string ACE_ENV_SINGLE_ARG_DECL    [pure virtual]
 

Return a string representation for this profile. client must deallocate memory.

Reimplemented in TAO_IIOP_Profile, and TAO_Unknown_Profile.

void TAO_Profile::verify_orb_configuration ACE_ENV_SINGLE_ARG_DECL    [private]
 

Verify that the current ORB's configuration supports tagged components in IORs.

void TAO_Profile::verify_profile_version ACE_ENV_SINGLE_ARG_DECL    [private]
 

Verify that the given profile supports tagged components, i.e. is not a GIOP 1.0 profile.

ACE_INLINE const TAO_GIOP_Message_Version & TAO_Profile::version void    const
 

Return a pointer to this profile's version. This object maintains ownership.


Member Data Documentation

CORBA::Short TAO_Profile::addressing_mode_ [protected]
 

The current addressing mode. This may be changed if a remote server sends back an address mode exception.

CORBA::Boolean TAO_Profile::are_policies_parsed_ [protected]
 

Flag indicating whether the lazy decoding of the client exposed policies has taken place.

TAO_MProfile* TAO_Profile::forward_to_ [private]
 

the TAO_MProfile which contains the profiles for the forwarded object.

TAO_ORB_Core* TAO_Profile::orb_core_ [private]
 

Pointer to the ORB core.

CORBA::PolicyList* TAO_Profile::policy_list_ [protected]
 

Client exposed policies of this profile.

CORBA::ULong TAO_Profile::refcount_ [private]
 

Number of outstanding references to this object.

TAO_SYNCH_MUTEX TAO_Profile::refcount_lock_ [private]
 

Mutex to protect reference count.

TAO_Stub* TAO_Profile::stub_ [protected]
 

Pointer to the TAO_Stub to which this profile is related.

CORBA::ULong TAO_Profile::tag_ [private]
 

IOP protocol tag.

TAO_Tagged_Components TAO_Profile::tagged_components_ [protected]
 

The tagged components.

TAO_GIOP_Message_Version TAO_Profile::version_ [protected]
 

IIOP version number.


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 18:49:38 2002 for TAO by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001