TAO_Protocol_Properties_Factory Class Reference

#include <RT_Policy_i.h>

List of all members.

Static Public Member Functions

static RTCORBA::ProtocolPropertiescreate_transport_protocol_property (IOP::ProfileId id, TAO_ORB_Core *orb_core)
static RTCORBA::ProtocolPropertiescreate_orb_protocol_property (IOP::ProfileId id)

Private Member Functions

 TAO_Protocol_Properties_Factory (void)


Detailed Description

Definition at line 782 of file RT_Policy_i.h.


Constructor & Destructor Documentation

TAO_Protocol_Properties_Factory::TAO_Protocol_Properties_Factory ( void   )  [private]


Member Function Documentation

RTCORBA::ProtocolProperties * TAO_Protocol_Properties_Factory::create_orb_protocol_property ( IOP::ProfileId  id  )  [static]

Creates the proper orb ProtocolProperties subclass for IOP::ProfileId. NOTE: Each IOP::ProfileId corresponds to two sets of protocol properties: one describes the transport protocol and the other describes the ORB messaging protocol.

Definition at line 1290 of file RT_Policy_i.cpp.

References ACE_NEW_RETURN.

Referenced by TAO_ClientProtocolPolicy::_tao_decode().

01291 {
01292   RTCORBA::ProtocolProperties* property = 0;
01293 
01294   if (id == IOP::TAG_INTERNET_IOP)
01295     ACE_NEW_RETURN (property,
01296                     TAO_GIOP_Protocol_Properties,
01297                     0);
01298 
01299   // Right now the only supported ORB protocol is GIOP
01300   // so we couple this with every protocol property.
01301   // The else statement is not necessary, but it
01302   // is here just to make clear that as soon as
01303   // new ORB protocol are supported other case
01304   // should be considered.
01305   else
01306     ACE_NEW_RETURN (property,
01307                     TAO_GIOP_Protocol_Properties,
01308                     0);
01309   return property;
01310 }

RTCORBA::ProtocolProperties * TAO_Protocol_Properties_Factory::create_transport_protocol_property ( IOP::ProfileId  id,
TAO_ORB_Core orb_core 
) [static]

Creates the proper transport ProtocolProperties subclass that matches the IOP::ProfileId. NOTE: Each IOP::ProfileId corresponds to two sets of protocol properties: one describes the transport protocol and the other describes the ORB messaging protocol.

Definition at line 1196 of file RT_Policy_i.cpp.

References ACE_NEW_RETURN, TAO_ORB_Parameters::nodelay(), TAO_ORB_Core::orb_params(), TAO_ORB_Parameters::sock_rcvbuf_size(), TAO_ORB_Parameters::sock_sndbuf_size(), TAO_TAG_DIOP_PROFILE, TAO_TAG_SCIOP_PROFILE, TAO_TAG_SHMEM_PROFILE, and TAO_TAG_UIOP_PROFILE.

Referenced by TAO_ClientProtocolPolicy::_tao_decode().

01198 {
01199   RTCORBA::ProtocolProperties* property = 0;
01200 
01201   if (id == IOP::TAG_INTERNET_IOP)
01202     {
01203       int send_buffer_size = orb_core ? orb_core->orb_params ()->sock_sndbuf_size () : 0;
01204       int recv_buffer_size = orb_core ? orb_core->orb_params ()->sock_rcvbuf_size () : 0;
01205       int no_delay = orb_core ? orb_core->orb_params ()->nodelay () : 0;
01206       CORBA::Boolean keep_alive = true;
01207       CORBA::Boolean dont_route = false;
01208       CORBA::Boolean enable_network_priority = false;
01209 
01210       ACE_NEW_RETURN (property,
01211                       TAO_TCP_Protocol_Properties (send_buffer_size,
01212                                                    recv_buffer_size,
01213                                                    keep_alive,
01214                                                    dont_route,
01215                                                    no_delay,
01216                                                    enable_network_priority),
01217                       0);
01218     }
01219 
01220   else if (id == TAO_TAG_SHMEM_PROFILE)
01221     {
01222       int send_buffer_size = orb_core ? orb_core->orb_params ()->sock_sndbuf_size () : 0;
01223       int recv_buffer_size = orb_core ? orb_core->orb_params ()->sock_rcvbuf_size () : 0;
01224       int no_delay = orb_core ? orb_core->orb_params ()->nodelay () : 0;
01225       CORBA::Boolean keep_alive = true;
01226       CORBA::Boolean dont_route = false;
01227       CORBA::Long preallocate_buffer_size = false;
01228       const char *mmap_filename = "";
01229       const char *mmap_lockname = "";
01230 
01231       ACE_NEW_RETURN (property,
01232                       TAO_SharedMemory_Protocol_Properties (send_buffer_size,
01233                                                             recv_buffer_size,
01234                                                             keep_alive,
01235                                                             dont_route,
01236                                                             no_delay,
01237                                                             preallocate_buffer_size,
01238                                                             mmap_filename,
01239                                                             mmap_lockname),
01240                       0);
01241     }
01242 
01243   else if (id == TAO_TAG_UIOP_PROFILE)
01244     {
01245       int send_buffer_size = orb_core ? orb_core->orb_params ()->sock_sndbuf_size () : 0;
01246       int recv_buffer_size = orb_core ? orb_core->orb_params ()->sock_rcvbuf_size () : 0;
01247 
01248       ACE_NEW_RETURN (property,
01249                       TAO_UnixDomain_Protocol_Properties (send_buffer_size,
01250                                                           recv_buffer_size),
01251                       0);
01252     }
01253 
01254   else if (id == TAO_TAG_DIOP_PROFILE)
01255     {
01256       int send_buffer_size = orb_core ? orb_core->orb_params ()->sock_sndbuf_size () : 0;
01257       int recv_buffer_size = orb_core ? orb_core->orb_params ()->sock_rcvbuf_size () : 0;
01258       CORBA::Boolean enable_network_priority = false;
01259 
01260       ACE_NEW_RETURN (property,
01261                       TAO_UserDatagram_Protocol_Properties (send_buffer_size,
01262                                                             recv_buffer_size,
01263                                                             enable_network_priority),
01264                       0);
01265     }
01266 
01267   else if (id == TAO_TAG_SCIOP_PROFILE)
01268     {
01269       int send_buffer_size = orb_core ? orb_core->orb_params ()->sock_sndbuf_size () : 0;
01270       int recv_buffer_size = orb_core ? orb_core->orb_params ()->sock_rcvbuf_size () : 0;
01271       int no_delay = orb_core ? orb_core->orb_params ()->nodelay () : 0;
01272       CORBA::Boolean keep_alive = true;
01273       CORBA::Boolean dont_route = false;
01274       CORBA::Boolean enable_network_priority = false;
01275 
01276       ACE_NEW_RETURN (property,
01277                       TAO_StreamControl_Protocol_Properties (send_buffer_size,
01278                                                              recv_buffer_size,
01279                                                              keep_alive,
01280                                                              dont_route,
01281                                                              no_delay,
01282                                                              enable_network_priority),
01283                       0);
01284     }
01285 
01286   return property;
01287 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:42:59 2010 for TAO_RTCORBA by  doxygen 1.4.7