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
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
virtual CORBA::ULong endpoint_count (void)=0
 Return how many endpoints this profile contains. More...

virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile)=0
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
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)
CORBA::Short addressing_mode (void) const

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.

Definition at line 40 of file Profile.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 5 of file Profile.i.

00008   : version_ (version),
00009     are_policies_parsed_ (0),
00010     stub_ (0),
00011     policy_list_ (0),
00012     addressing_mode_ (0),
00013     tag_ (tag),
00014     orb_core_ (orb_core),
00015     forward_to_ (0),
00016     refcount_ (1)
00017 {
00018 }

TAO_Profile::~TAO_Profile void    [virtual]
 

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

Definition at line 22 of file Profile.cpp.

00023 {
00024 }

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.

Definition at line 51 of file Profile.i.

References ACE_GUARD_RETURN, refcount_, and TAO_SYNCH_MUTEX.

Referenced by TAO_MProfile::cleanup, TAO_IIOP_Acceptor::create_new_profile, TAO_IIOP_Connector::create_profile, TAO_Connector_Registry::create_profile, TAO_IIOP_Acceptor::create_shared_profile, TAO_Connector::make_mprofile, TAO_MProfile::remove_profile, TAO_MProfile::set, TAO_Stub::set_profile_in_use_i, and TAO_Stub::~TAO_Stub.

00052 {
00053   {
00054     ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->refcount_lock_, 0);
00055     this->refcount_--;
00056     if (this->refcount_ != 0)
00057       return this->refcount_;
00058   }
00059 
00060   // refcount is 0, so delete us!
00061   // delete will call our ~ destructor which in turn deletes stuff.
00062   delete this;
00063   return 0;
00064 }

ACE_INLINE CORBA::ULong TAO_Profile::_incr_refcnt void   
 

Increase the reference count by one on this object.

Definition at line 39 of file Profile.i.

References ACE_GUARD_RETURN, refcount_, and TAO_SYNCH_MUTEX.

Referenced by TAO_MProfile::add_profile, TAO_MProfile::set, and TAO_Stub::set_profile_in_use_i.

00040 {
00041   // OK, think I got it.  When this object is created (guard) the
00042   // lock is automatically acquired (refcount_lock_).  Then when
00043   // we leave this method the destructir for guard is called which
00044   // releases the lock!
00045   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->refcount_lock_, 0);
00046 
00047   return this->refcount_++;
00048 }

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!

Implemented in TAO_IIOP_Profile.

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

Add the given tagged component to the profile.

Definition at line 27 of file Profile.cpp.

References ACE_CHECK, ACE_ENV_ARG_DECL, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_Tagged_Components::set_component, tagged_components, verify_orb_configuration, and verify_profile_version.

00029 {
00030   // Sanity checks.
00031   this->verify_orb_configuration (ACE_ENV_SINGLE_ARG_PARAMETER);
00032   ACE_CHECK;
00033 
00034   this->verify_profile_version (ACE_ENV_SINGLE_ARG_PARAMETER);
00035   ACE_CHECK;
00036 
00037   // ----------------------------------------------------------------
00038 
00039   // Add the given tagged component to this profile.
00040   this->tagged_components ().set_component (component);
00041 }

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.

Definition at line 97 of file Profile.i.

References addressing_mode_.

00098 {
00099   return this->addressing_mode_;
00100 }

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.

Implemented in TAO_IIOP_Profile.

Referenced by TAO_Stub::get_profile_ior_info.

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

Initialize this object using the given CDR octet string.

Implemented in TAO_IIOP_Profile.

Referenced by TAO_IIOP_Connector::create_profile, and TAO_Connector_Registry::create_profile.

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

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

Implemented in TAO_IIOP_Profile.

Referenced by operator<<.

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.

Implemented in TAO_IIOP_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.

Implemented in TAO_IIOP_Profile.

Referenced by TAO_Acceptor_Registry::is_collocated, and TAO_Stub::~TAO_Stub.

virtual CORBA::ULong TAO_Profile::endpoint_count void    [pure virtual]
 

Return how many endpoints this profile contains.

Implemented in TAO_IIOP_Profile.

ACE_INLINE TAO_MProfile * TAO_Profile::forward_to void   
 

MProfile accessor.

Definition at line 73 of file Profile.i.

References forward_to_.

00074 {
00075   return this->forward_to_;
00076 }

ACE_INLINE void TAO_Profile::forward_to TAO_MProfile   mprofiles
 

Keep a pointer to the forwarded profile.

Definition at line 67 of file Profile.i.

References forward_to_.

Referenced by TAO_Stub::add_forward_profiles, and TAO_Stub::forward_back_one.

00068 {
00069   this->forward_to_ = mprofiles;
00070 }

ACE_INLINE TAO_MProfile * TAO_Profile::forward_to_i void    [private]
 

this object keeps ownership of this object.

Definition at line 79 of file Profile.i.

References forward_to_.

00080 {
00081   return this->forward_to_;
00082 }

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

Return a hash value for this object.

Implemented in TAO_IIOP_Profile.

Referenced by TAO_MProfile::hash.

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.

Implemented in TAO_IIOP_Profile.

Referenced by TAO_Stub::is_equivalent, TAO_MProfile::is_equivalent, and TAO_MProfile::remove_profile.

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

deprecated. return a reference to the Object Key.

@

Implemented in TAO_IIOP_Profile.

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

The object key delimiter.

Implemented in TAO_IIOP_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>.

Definition at line 33 of file Profile.i.

References orb_core_.

Referenced by TAO_IIOP_Profile::create_tagged_profile, and TAO_IIOP_Profile::encode.

00034 {
00035   return this->orb_core_;
00036 }

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.

Implemented in TAO_IIOP_Profile.

Referenced by TAO_Connector::make_mprofile.

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

Accessor for the client exposed policies of this profile.

Definition at line 135 of file Profile.cpp.

References CORBA::Policy_var::_retn, ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_DEBUG, ACE_ENDTRY, ACE_ENV_ARG_NOT_USED, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, ACE_PRINT_EXCEPTION, ACE_TEXT, ACE_THROW_RETURN, ACE_TRY_CHECK, ACE_TRY_NEW_ENV, ACE_TRY_THROW, are_policies_parsed_, TAO_Stub::base_profiles, IOP::TaggedComponent::component_data, Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::get_buffer, TAO_Tagged_Components::get_component, CORBA::Policy_var::in, CORBA::is_nil, TAO_Unbounded_Base_Sequence::length, LM_DEBUG, TAO_ORB_Core::orb, orb_core_, TAO_MProfile::policy_list_, ACE_InputCDR::reset_byte_order, stub_, IOP::TaggedComponent::tag, and tagged_components_.

00136 {
00137 #if (TAO_HAS_CORBA_MESSAGING == 1)
00138 
00139   CORBA::PolicyList * pl = this->stub_->base_profiles ().policy_list_;
00140 
00141   if (!this->are_policies_parsed_)
00142     // None has already parsed the policies.
00143     {
00144       IOP::TaggedComponent tagged_component;
00145       tagged_component.tag = Messaging::TAG_POLICIES;
00146 
00147       // This gets a component with the proper "tag" field
00148       // if it exists.
00149       if (this->tagged_components_.get_component (tagged_component))
00150         {
00151           const CORBA::Octet *buf =
00152             tagged_component.component_data.get_buffer ();
00153 
00154           TAO_InputCDR in_cdr (ACE_reinterpret_cast (const char *, buf),
00155                                tagged_component.component_data.length ());
00156 
00157           // Extract the Byte Order
00158           CORBA::Boolean byte_order;
00159           if ((in_cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0)
00160               return *(stub_->base_profiles ().policy_list_);
00161           in_cdr.reset_byte_order (ACE_static_cast(int, byte_order));
00162 
00163           // Now we take out the Messaging::PolicyValueSeq out from the
00164           // CDR.
00165           Messaging::PolicyValueSeq policy_value_seq;
00166           if (!(in_cdr >> policy_value_seq))
00167             {
00168               ACE_THROW_RETURN (CORBA::INV_OBJREF (),
00169                                 *(stub_->base_profiles ().policy_list_));
00170             }
00171 
00172           // Here we extract the Messaging::PolicyValue out of the sequence
00173           // and we convert those into the proper CORBA::Policy
00174 
00175           CORBA::Policy_var policy;
00176           CORBA::ULong length = policy_value_seq.length ();
00177 
00178           // Set the policy list length.
00179           pl->length (length);
00180 
00181           for (CORBA::ULong i = 0; i < length; ++i)
00182             {
00183               ACE_TRY_NEW_ENV
00184                 {
00185                   policy =
00186                     this->orb_core_->orb ()->_create_policy (
00187                       policy_value_seq[i].ptype
00188                       ACE_ENV_ARG_PARAMETER);
00189                   ACE_TRY_CHECK;
00190 
00191                   if (!CORBA::is_nil (policy.in ()))
00192                     {
00193                       buf = policy_value_seq[i].pvalue.get_buffer ();
00194 
00195                       TAO_InputCDR in_cdr (
00196                         ACE_reinterpret_cast (const char*, buf),
00197                         policy_value_seq[i].pvalue.length ());
00198 
00199 
00200                       if (!(in_cdr >> ACE_InputCDR::to_boolean (byte_order)))
00201                         ACE_TRY_THROW (CORBA::INV_OBJREF ());
00202 
00203                       in_cdr.reset_byte_order (ACE_static_cast (int,
00204                                                                 byte_order));
00205 
00206                       policy->_tao_decode (in_cdr);
00207                       (*pl)[i] = policy._retn ();
00208                     }
00209                   else
00210                     {
00211                       // This case should occure when in the IOR are
00212                       // embedded policies that TAO doesn't support,
00213                       // so as specified by the RT-CORBA
00214                       // spec. ptc/99-05-03 we just ignore these
00215                       // un-understood policies.
00216 
00217                       if (TAO_debug_level >= 5)
00218                         ACE_DEBUG ((LM_DEBUG,
00219                                     ACE_TEXT ("The IOR contains unsupported "
00220                                               "policies.\n")));
00221                     }
00222                 }
00223               ACE_CATCHANY
00224                 {
00225                   // This case should occur when in the IOR are
00226                   // embedded policies that TAO doesn't support, so as
00227                   // specified by the RT-CORBA spec. ptc/99-05-03 we
00228                   // just ignore these un-understood policies.
00229 
00230                   if (TAO_debug_level >= 5)
00231                     ACE_PRINT_EXCEPTION(ACE_ANY_EXCEPTION,
00232                                         ACE_TEXT ("IOR contains ")
00233                                         ACE_TEXT ("unsupported policies."));
00234                 }
00235               ACE_ENDTRY;
00236             }
00237         }
00238     }
00239 
00240 #else
00241   ACE_ENV_ARG_NOT_USED;    // FUZZ: ignore check_for_ace_check
00242 #endif /* (TAO_HAS_CORBA_MESSAGING == 1) */
00243 
00244   return *(stub_->base_profiles ().policy_list_);
00245 }

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.

Definition at line 44 of file Profile.cpp.

References ACE_CHECK, ACE_DEBUG, ACE_ENV_ARG_DECL, ACE_ENV_ARG_NOT_USED, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TEXT, are_policies_parsed_, ACE_OutputCDR::begin, IOP::TaggedComponent::component_data, ACE_Message_Block::cont, Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::get_buffer, ACE_Message_Block::length, TAO_Unbounded_Base_Sequence::length, LM_DEBUG, ACE_OS_String::memcpy, ACE_Message_Block::rd_ptr, TAO_Tagged_Components::set_component, IOP::TaggedComponent::tag, tagged_components_, TAO_ENCAP_BYTE_ORDER, and ACE_OutputCDR::total_length.

Referenced by TAO_ORB_Core::create_stub_object, and TAO_MProfile::init_policy_list.

00046 {
00047 #if (TAO_HAS_CORBA_MESSAGING == 1)
00048 
00049   if (policy_list == 0)
00050     {
00051       if (TAO_debug_level)
00052         ACE_DEBUG ((LM_DEBUG,
00053                     ACE_TEXT ("TAO_Profile::policies: Null Policy List!\n")));
00054       return;
00055     }
00056 
00057   Messaging::PolicyValue pv;
00058   Messaging::PolicyValueSeq policy_value_seq;
00059 
00060   size_t length;
00061   CORBA::Octet *buf = 0;
00062 
00063   policy_value_seq.length (policy_list->length ());
00064 
00065   // This loop iterates through CORBA::PolicyList to convert
00066   // each CORBA::Policy into a CORBA::PolicyValue
00067   for (CORBA::ULong i = 0; i < policy_list->length (); ++i)
00068     {
00069       TAO_OutputCDR out_CDR;
00070       policy_value_seq[i].ptype =
00071         (*policy_list)[i]->policy_type (ACE_ENV_SINGLE_ARG_PARAMETER);
00072       ACE_CHECK;
00073 
00074       out_CDR << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER);
00075       (*policy_list)[i]->_tao_encode (out_CDR);
00076 
00077       length = out_CDR.total_length ();
00078       policy_value_seq[i].pvalue.length (ACE_static_cast(CORBA::ULong,
00079                                                          length));
00080 
00081       buf = policy_value_seq[i].pvalue.get_buffer ();
00082 
00083       // Copy the CDR buffer data into the sequence<octect> buffer.
00084 
00085       for (const ACE_Message_Block *iterator = out_CDR.begin ();
00086            iterator != 0;
00087            iterator = iterator->cont ())
00088         {
00089           ACE_OS::memcpy (buf, iterator->rd_ptr (), iterator->length ());
00090           buf += iterator->length ();
00091         }
00092     }
00093 
00094   TAO_OutputCDR out_cdr;
00095   // Now we have to embed the Messaging::PolicyValueSeq into
00096   // a TaggedComponent.
00097 
00098   IOP::TaggedComponent tagged_component;
00099   tagged_component.tag = Messaging::TAG_POLICIES;
00100 
00101   out_cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER);
00102   out_cdr << policy_value_seq;
00103 
00104   length = out_cdr.total_length ();
00105 
00106   tagged_component.component_data.length (ACE_static_cast(CORBA::ULong,
00107                                                           length));
00108   buf = tagged_component.component_data.get_buffer ();
00109 
00110   for (const ACE_Message_Block *iterator = out_cdr.begin ();
00111        iterator != 0;
00112        iterator = iterator->cont ())
00113     {
00114       size_t i_length = iterator->length ();
00115       ACE_OS::memcpy (buf, iterator->rd_ptr (), i_length);
00116 
00117       buf += i_length;
00118     }
00119 
00120   // Eventually we add the TaggedComponent to the TAO_TaggedComponents
00121   // member variable.
00122   tagged_components_.set_component (tagged_component);
00123   this->are_policies_parsed_ = 1;
00124 
00125 #else /* TAO_HAS_CORBA_MESSAGING == 1 */
00126 
00127   ACE_UNUSED_ARG (policy_list);
00128   ACE_ENV_ARG_NOT_USED;  // FUZZ: ignore check_for_ace_check
00129 
00130 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00131 }

int TAO_Profile::supports_multicast void    const [virtual]
 

Returns true if this profile can specify multicast endpoints.

Definition at line 320 of file Profile.cpp.

00321 {
00322   // Most profiles do not support multicast endpoints.
00323   return 0;
00324 }

ACE_INLINE CORBA::ULong TAO_Profile::tag void    const
 

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

Definition at line 21 of file Profile.i.

References tag_.

Referenced by TAO_IIOP_Acceptor::create_shared_profile, TAO_Unknown_Profile::create_tagged_profile, TAO_IIOP_Profile::hash, TAO_Acceptor_Registry::is_collocated, TAO_Unknown_Profile::is_equivalent, and TAO_IIOP_Profile::is_equivalent.

00022 {
00023   return this->tag_;
00024 }

ACE_INLINE TAO_Tagged_Components & TAO_Profile::tagged_components void   
 

Definition at line 91 of file Profile.i.

References tagged_components_.

00092 {
00093   return this->tagged_components_;
00094 }

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).

Definition at line 85 of file Profile.i.

References tagged_components_.

Referenced by add_tagged_component, TAO_IIOP_Acceptor::create_new_profile, TAO_IIOP_Profile::create_profile_body, TAO_IIOP_Acceptor::create_shared_profile, and TAO_Codeset_Manager::set_tcs.

00086 {
00087   return this->tagged_components_;
00088 }

TAO_Stub * TAO_Profile::the_stub void    [virtual]
 

Gets the TAO_MProfile that holds the TAO_Profile instance.

Definition at line 254 of file Profile.cpp.

References stub_.

00255 {
00256   return stub_;
00257 }

void TAO_Profile::the_stub TAO_Stub   stub [virtual]
 

Sets the TAO_Stub to which this profile is associated.

Definition at line 248 of file Profile.cpp.

References stub_.

Referenced by TAO_Stub::TAO_Stub.

00249 {
00250   this->stub_ = stub;
00251 }

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

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

Implemented in TAO_IIOP_Profile.

Referenced by CORBA_ORB::object_to_string.

void TAO_Profile::verify_orb_configuration ACE_ENV_SINGLE_ARG_DECL    [private]
 

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

Definition at line 260 of file Profile.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_ENV_SINGLE_ARG_DECL, ACE_ERROR, ACE_TEXT, ACE_THROW, LM_ERROR, TAO_ORB_Core::orb, orb_core_, TAO_ORB_Core::orb_params, TAO_ORB_Parameters::std_profile_components, and TAO_DEFAULT_MINOR_CODE.

Referenced by add_tagged_component.

00261 {
00262   // If the ORB isn't configured to support tagged components, then
00263   // throw an exception.
00264   if (this->orb_core_->orb_params ()->std_profile_components () == 0
00265       || !this->orb_core_->orb ()->_use_omg_ior_format ())
00266     {
00267       if (TAO_debug_level > 0)
00268         ACE_ERROR ((LM_ERROR,
00269                     ACE_TEXT ("(%P|%t) Cannot add ")
00270                     ACE_TEXT ("IOP::TaggedComponent to profile.\n")
00271                     ACE_TEXT ("(%P|%t) Standard profile components ")
00272                     ACE_TEXT ("have been disabled or URL style IORs\n")
00273                     ACE_TEXT ("(%P|%t) are in use.  Try ")
00274                     ACE_TEXT ("\"-ORBStdProfileComponents 1\" and/or\n")
00275                     ACE_TEXT ("(%P|%t) \"-ORBObjRefStyle IOR\".\n")));
00276 
00277       // According to the Portable Interceptor specification, we're
00278       // supposed to throw a CORBA::BAD_PARAM exception if it isn't
00279       // possible to add components to the profile.
00280       // @todo: We need the proper minor code as soon as the spec is
00281       //        updated.
00282       ACE_THROW (CORBA::BAD_PARAM (
00283                    CORBA_SystemException::_tao_minor_code (
00284                       TAO_DEFAULT_MINOR_CODE,
00285                       EINVAL),
00286                    CORBA::COMPLETED_NO));
00287     }
00288 }

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.

Definition at line 291 of file Profile.cpp.

References CORBA_SystemException::_tao_minor_code, ACE_ENV_SINGLE_ARG_DECL, ACE_ERROR, ACE_TEXT, ACE_THROW, LM_ERROR, TAO_GIOP_Message_Version::major, TAO_GIOP_Message_Version::minor, TAO_DEFAULT_MINOR_CODE, and version_.

Referenced by add_tagged_component.

00292 {
00293   // GIOP 1.0 does not support tagged components.  Throw an exception
00294   // if the profile is a GIOP 1.0 profile.
00295 
00296   if (this->version_.major == 1 && this->version_.minor == 0)
00297     {
00298       if (TAO_debug_level > 0)
00299         ACE_ERROR ((LM_ERROR,
00300                     ACE_TEXT ("(%P|%t) Cannot add ")
00301                     ACE_TEXT ("IOP::TaggedComponent to GIOP 1.0")
00302                     ACE_TEXT ("IOR profile.\n")
00303                     ACE_TEXT ("(%P|%t) Try using a GIOP 1.1 or ")
00304                     ACE_TEXT ("greater endpoint.\n")));
00305 
00306       // According to the Portable Interceptor specification, we're
00307       // supposed to throw a CORBA::BAD_PARAM exception if it isn't
00308       // possible to add components to the profile.
00309       // @todo: We need the proper minor code as soon as the spec is
00310       //        updated.
00311       ACE_THROW (CORBA::BAD_PARAM (
00312                    CORBA_SystemException::_tao_minor_code (
00313                      TAO_DEFAULT_MINOR_CODE,
00314                      EINVAL),
00315                    CORBA::COMPLETED_NO));
00316     }
00317 }

ACE_INLINE const TAO_GIOP_Message_Version & TAO_Profile::version void    const
 

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

Definition at line 27 of file Profile.i.

References version_.

Referenced by TAO_GIOP_Invocation::perform_call.

00028 {
00029   return this->version_;
00030 }


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.

Definition at line 244 of file Profile.h.

Referenced by addressing_mode.

CORBA::Boolean TAO_Profile::are_policies_parsed_ [protected]
 

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

Definition at line 227 of file Profile.h.

Referenced by policies.

TAO_MProfile* TAO_Profile::forward_to_ [private]
 

the TAO_MProfile which contains the profiles for the forwarded object.

Definition at line 256 of file Profile.h.

Referenced by forward_to, and forward_to_i.

TAO_ORB_Core* TAO_Profile::orb_core_ [private]
 

Pointer to the ORB core.

Definition at line 252 of file Profile.h.

Referenced by orb_core, policies, and verify_orb_configuration.

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

Client exposed policies of this profile.

Definition at line 233 of file Profile.h.

CORBA::ULong TAO_Profile::refcount_ [private]
 

Number of outstanding references to this object.

Definition at line 262 of file Profile.h.

Referenced by _decr_refcnt, and _incr_refcnt.

TAO_SYNCH_MUTEX TAO_Profile::refcount_lock_ [private]
 

Mutex to protect reference count.

Definition at line 259 of file Profile.h.

TAO_Stub* TAO_Profile::stub_ [protected]
 

Pointer to the TAO_Stub to which this profile is related.

Definition at line 230 of file Profile.h.

Referenced by policies, and the_stub.

CORBA::ULong TAO_Profile::tag_ [private]
 

IOP protocol tag.

Definition at line 249 of file Profile.h.

Referenced by tag.

TAO_Tagged_Components TAO_Profile::tagged_components_ [protected]
 

The tagged components.

Definition at line 223 of file Profile.h.

Referenced by TAO_IIOP_Profile::decode, TAO_IIOP_Profile::decode_endpoints, TAO_IIOP_Profile::encode_endpoints, TAO_IIOP_Profile::encode_endpoints_for_rt, policies, and tagged_components.

TAO_GIOP_Message_Version TAO_Profile::version_ [protected]
 

IIOP version number.

Definition at line 220 of file Profile.h.

Referenced by TAO_IIOP_Profile::create_profile_body, TAO_IIOP_Profile::decode, TAO_IIOP_Profile::hash, TAO_IIOP_Profile::is_equivalent, verify_profile_version, and version.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:37:30 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002