TAO_Server_Protocol_Acceptor_Filter Class Reference

Populates mprofile with endpoints selected based on the RTCORBA::ServerProtocolPolicy. More...

#include <RT_Acceptor_Filters.h>

Inheritance diagram for TAO_Server_Protocol_Acceptor_Filter:

Inheritance graph
[legend]
Collaboration diagram for TAO_Server_Protocol_Acceptor_Filter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Server_Protocol_Acceptor_Filter (RTCORBA::ProtocolList &protocols)
 Constructor.

int fill_profile (const TAO::ObjectKey &object_key, TAO_MProfile &mprofile, TAO_Acceptor **acceptors_begin, TAO_Acceptor **acceptors_end, CORBA::Short priority)
 Populate mprofile based on what's in .

int encode_endpoints (TAO_MProfile &mprofile)

Private Attributes

RTCORBA::ProtocolList & protocols_

Detailed Description

Populates mprofile with endpoints selected based on the RTCORBA::ServerProtocolPolicy.

Definition at line 45 of file RT_Acceptor_Filters.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Server_Protocol_Acceptor_Filter::TAO_Server_Protocol_Acceptor_Filter RTCORBA::ProtocolList &  protocols  ) 
 

Constructor.

Definition at line 18 of file RT_Acceptor_Filters.cpp.

00020   : protocols_ (protocols)
00021 {
00022 }


Member Function Documentation

int TAO_Server_Protocol_Acceptor_Filter::encode_endpoints TAO_MProfile mprofile  )  [virtual]
 

Encodes the endpoints in the profiles into the TAO_TAG_ENDPOINTS tag component of profiles.

Implements TAO_Acceptor_Filter.

Definition at line 52 of file RT_Acceptor_Filters.cpp.

References TAO_Profile::encode_endpoints(), TAO_MProfile::get_profile(), and TAO_MProfile::profile_count().

00053 {
00054   // Encode endpoints.
00055   for (CORBA::ULong i = 0; i < mprofile.profile_count (); ++i)
00056     {
00057       TAO_Profile *profile = mprofile.get_profile (i);
00058       if (profile->encode_endpoints () == -1)
00059         return -1;
00060     }
00061 
00062   return 0;
00063 }

int TAO_Server_Protocol_Acceptor_Filter::fill_profile const TAO::ObjectKey object_key,
TAO_MProfile mprofile,
TAO_Acceptor **  acceptors_begin,
TAO_Acceptor **  acceptors_end,
CORBA::Short  priority
[virtual]
 

Populate mprofile based on what's in .

Implements TAO_Acceptor_Filter.

Definition at line 25 of file RT_Acceptor_Filters.cpp.

References protocols_.

00031 {
00032   // RTCORBA 1.0, Section 4.15.1: ServerProtocolPolicy determines
00033   // which protocols get included into IOR and in what order.
00034   for (CORBA::ULong j = 0; j < this->protocols_.length (); ++j)
00035     {
00036       CORBA::ULong protocol_type = this->protocols_[j].protocol_type;
00037 
00038       for (TAO_Acceptor** acceptor = acceptors_begin;
00039            acceptor != acceptors_end;
00040            ++acceptor)
00041         if ((*acceptor)->tag () == protocol_type &&
00042             ((*acceptor)->create_profile (object_key,
00043                                           mprofile,
00044                                           priority) == -1))
00045           return -1;
00046     }
00047 
00048   return 0;
00049 }


Member Data Documentation

RTCORBA::ProtocolList& TAO_Server_Protocol_Acceptor_Filter::protocols_ [private]
 

Value of the ServerProtocolPolicy used for endpoint selection.

Definition at line 66 of file RT_Acceptor_Filters.h.

Referenced by fill_profile().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:31:22 2008 for TAO_RTPortableServer by doxygen 1.3.6