RT_Policy_i.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 //=============================================================================
00003 /**
00004  *  @file   RT_Policy_i.h
00005  *
00006  *  RT_Policy_i.h,v 1.17 2006/03/10 07:19:16 jtc Exp
00007  *
00008  *  @author Marina Spivak (marina@cs.wustl.edu)
00009  */
00010 //=============================================================================
00011 
00012 
00013 #ifndef TAO_RT_POLICY_I_H
00014 #define TAO_RT_POLICY_I_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/orbconf.h"
00019 
00020 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #define TAO_RTCORBA_SAFE_INCLUDE
00027 #include "tao/RTCORBA/RTCORBAC.h"
00028 #undef TAO_RTCORBA_SAFE_INCLUDE
00029 
00030 #include "tao/LocalObject.h"
00031 #include "tao/Basic_Types.h"
00032 
00033 #include "ace/SString.h"
00034 
00035 #if defined(_MSC_VER)
00036 #pragma warning(push)
00037 #pragma warning(disable:4250)
00038 #endif /* _MSC_VER */
00039 
00040 
00041 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00042 
00043 /**
00044  * @class TAO_PriorityModelPolicy
00045  *
00046  * @brief RTCORBA::PriorityModelPolicy implementation
00047  *
00048  * This policy controls how the priority at which a server handles
00049  * requests from clients is determined.
00050  */
00051 class TAO_RTCORBA_Export TAO_PriorityModelPolicy
00052   : public RTCORBA::PriorityModelPolicy,
00053     public TAO_Local_RefCounted_Object
00054 {
00055 public:
00056   /// Constructor.
00057   TAO_PriorityModelPolicy (RTCORBA::PriorityModel priority_model,
00058                            RTCORBA::Priority server_priority);
00059 
00060   /// Copy constructor.
00061   TAO_PriorityModelPolicy (const TAO_PriorityModelPolicy &rhs);
00062 
00063   /**
00064    * Accessor for the <priority_model_> attribute.  This method is
00065    * used internally by the orb.  This is a more efficient
00066    * (non-virtual, no exception handling) relative of the idl interface
00067    * implementation <priority_model> below.
00068    */
00069   RTCORBA::PriorityModel get_priority_model (void);
00070 
00071   RTCORBA::PriorityModel priority_model (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00072     ACE_THROW_SPEC ((CORBA::SystemException));
00073 
00074   RTCORBA::Priority server_priority (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00075     ACE_THROW_SPEC ((CORBA::SystemException));
00076 
00077   CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00078     ACE_THROW_SPEC ((CORBA::SystemException));
00079 
00080   CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00081     ACE_THROW_SPEC ((CORBA::SystemException));
00082 
00083   void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00084     ACE_THROW_SPEC ((CORBA::SystemException));
00085 
00086   /// This method writes a CDR representation of the object state.
00087   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00088 
00089   /// This method reads the object state from a CDR representation.
00090   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00091 
00092   // Return the cached policy type for this policy.
00093   TAO_Cached_Policy_Type _tao_cached_type (void) const;
00094 
00095   // Returns the scope at which this policy can be applied. See orbconf.h.
00096   TAO_Policy_Scope _tao_scope (void) const;
00097 
00098   /// Helper method for the implementation of
00099   /// CORBA::ORB::create_policy.
00100   static CORBA::Policy_ptr create (const CORBA::Any &val
00101                                    ACE_ENV_ARG_DECL);
00102 
00103 protected:
00104 
00105   /// Protected destructor to enforce proper memory management of this
00106   /// reference counted object.
00107   virtual ~TAO_PriorityModelPolicy (void);
00108 
00109   /// This constructor is used by TAO_RT_PolicyFactory when decoding
00110   /// policies from tagged components in an IOR.
00111   friend class TAO_RT_PolicyFactory;
00112   TAO_PriorityModelPolicy (void);
00113 
00114 private:
00115 
00116   /// Attributes.
00117   RTCORBA::PriorityModel priority_model_;
00118   RTCORBA::Priority server_priority_;
00119 };
00120 
00121 //*************************************************************************
00122 
00123 /**
00124  * @class TAO_ThreadpoolPolicy
00125  *
00126  * @brief RTCORBA::ThreadpoolPolicy implementation
00127  *
00128  * This policy controls which threadpool is associated with a POA.
00129  */
00130 class TAO_RTCORBA_Export TAO_ThreadpoolPolicy
00131   : public RTCORBA::ThreadpoolPolicy,
00132     public TAO_Local_RefCounted_Object
00133 {
00134 public:
00135   /// Constructor.
00136   TAO_ThreadpoolPolicy (RTCORBA::ThreadpoolId id);
00137 
00138   /// Copy constructor.
00139   TAO_ThreadpoolPolicy (const TAO_ThreadpoolPolicy &rhs);
00140 
00141   RTCORBA::ThreadpoolId threadpool (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00142     ACE_THROW_SPEC ((CORBA::SystemException));
00143 
00144   CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00145     ACE_THROW_SPEC ((CORBA::SystemException));
00146 
00147   CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00148     ACE_THROW_SPEC ((CORBA::SystemException));
00149 
00150   void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00151     ACE_THROW_SPEC ((CORBA::SystemException));
00152 
00153   // Return the cached policy type for this policy.
00154   TAO_Cached_Policy_Type _tao_cached_type (void) const;
00155 
00156   // Returns the scope at which this policy can be applied. See orbconf.h.
00157   TAO_Policy_Scope _tao_scope (void) const;
00158 
00159   /// Helper method for the implementation of
00160   /// CORBA::ORB::create_policy.
00161   static CORBA::Policy_ptr create (const CORBA::Any &val
00162                                    ACE_ENV_ARG_DECL);
00163 
00164 protected:
00165 
00166   /// Protected destructor to enforce proper memory management of this
00167   /// reference counted object.
00168   virtual ~TAO_ThreadpoolPolicy (void);
00169 
00170 private:
00171 
00172   /// Attribute.
00173   RTCORBA::ThreadpoolId id_;
00174 };
00175 
00176 //*************************************************************************
00177 
00178 /**
00179  * @class TAO_PrivateConnectionPolicy
00180  *
00181  * @brief RTCORBA::PrivateConnectionPolicy implementation
00182  *
00183  * This policy controls whether the transport connection for the
00184  * Object is private, i.e., not available for carrying out invocations on
00185  * other objects.
00186  */
00187 class TAO_RTCORBA_Export TAO_PrivateConnectionPolicy
00188   : public RTCORBA::PrivateConnectionPolicy,
00189     public TAO_Local_RefCounted_Object
00190 {
00191 public:
00192   /// Constructor.
00193   TAO_PrivateConnectionPolicy (void);
00194 
00195   /// Copy constructor.
00196   TAO_PrivateConnectionPolicy (const TAO_PrivateConnectionPolicy &rhs);
00197 
00198   CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00199     ACE_THROW_SPEC ((CORBA::SystemException));
00200 
00201   CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00202     ACE_THROW_SPEC ((CORBA::SystemException));
00203 
00204   void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00205     ACE_THROW_SPEC ((CORBA::SystemException));
00206 
00207   // Return the cached policy type for this policy.
00208   TAO_Cached_Policy_Type _tao_cached_type (void) const;
00209 
00210   // Returns the scope at which this policy can be applied. See orbconf.h.
00211   TAO_Policy_Scope _tao_scope (void) const;
00212 
00213   /// Helper method for the implementation of
00214   /// CORBA::ORB::create_policy.
00215   static CORBA::Policy_ptr create (const CORBA::Any &val
00216                                    ACE_ENV_ARG_DECL);
00217 
00218 protected:
00219 
00220   /// Protected destructor to enforce proper memory management of this
00221   /// reference counted object.
00222   virtual ~TAO_PrivateConnectionPolicy (void);
00223 
00224 };
00225 
00226 //*************************************************************************
00227 
00228 /**
00229  * @class TAO_PriorityBandedConnectionPolicy
00230  *
00231  * @brief RTCORBA::PriorityBandedConnectionPolicy implementation
00232  *
00233  * RT CORBA provides facility for a client to communicate with a
00234  * server via multiple connections, aka bands, with each connection handling
00235  * invocations that are made at a different CORBA priority.
00236  * This policy allows the specification of the number of such
00237  * bands and their priorities.
00238  */
00239 class TAO_RTCORBA_Export TAO_PriorityBandedConnectionPolicy
00240   : public RTCORBA::PriorityBandedConnectionPolicy,
00241     public TAO_Local_RefCounted_Object
00242 {
00243 public:
00244   /// Constructor.
00245   TAO_PriorityBandedConnectionPolicy (const RTCORBA::PriorityBands &bands);
00246 
00247   /// Copy constructor.
00248   TAO_PriorityBandedConnectionPolicy (const TAO_PriorityBandedConnectionPolicy &rhs);
00249 
00250   /**
00251    * Accessor to the underlying priority bands of the policy (does not
00252    * make a copy like the idl accessor <priority_bands> implementation
00253    * below.)
00254    */
00255   RTCORBA::PriorityBands &priority_bands_rep (void);
00256 
00257   RTCORBA::PriorityBands *priority_bands (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00258     ACE_THROW_SPEC ((CORBA::SystemException));
00259 
00260   CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00261     ACE_THROW_SPEC ((CORBA::SystemException));
00262 
00263   CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00264     ACE_THROW_SPEC ((CORBA::SystemException));
00265 
00266   void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00267     ACE_THROW_SPEC ((CORBA::SystemException));
00268 
00269   /// This method writes a CDR representation of the current object.
00270   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00271 
00272   /// This method reads the object state from a CDR representation.
00273   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00274 
00275   // Return the cached policy type for this policy.
00276   TAO_Cached_Policy_Type _tao_cached_type (void) const;
00277 
00278   // Returns the scope at which this policy can be applied. See orbconf.h.
00279   TAO_Policy_Scope _tao_scope (void) const;
00280 
00281   /// Helper method for the implementation of
00282   /// CORBA::ORB::create_policy.
00283   static CORBA::Policy_ptr create (const CORBA::Any &val
00284                                    ACE_ENV_ARG_DECL);
00285 
00286 protected:
00287 
00288   /// Protected destructor to enforce proper memory management of this
00289   /// reference counted object.
00290   virtual ~TAO_PriorityBandedConnectionPolicy (void);
00291 
00292   /// This constructor is used by TAO_RT_PolicyFactory when decoding
00293   /// policies from tagged components in an IOR.
00294   friend class TAO_RT_PolicyFactory;
00295   TAO_PriorityBandedConnectionPolicy (void);
00296 
00297 private:
00298 
00299   /// Attribute.
00300   RTCORBA::PriorityBands priority_bands_;
00301 };
00302 
00303 //*************************************************************************
00304 
00305 /**
00306  * @class TAO_ServerProtocolPolicy
00307  *
00308  * @brief RTCORBA::ServerProtocolPolicy implementation
00309  *
00310  * This policy controls selection and configuration of
00311  * communication protocols on the server-side of the RT ORB.
00312  */
00313 class TAO_RTCORBA_Export TAO_ServerProtocolPolicy
00314   : public RTCORBA::ServerProtocolPolicy,
00315     public TAO_Local_RefCounted_Object
00316 {
00317 public:
00318   /// Constructor.
00319   TAO_ServerProtocolPolicy (const RTCORBA::ProtocolList &protocols);
00320 
00321   /// Copy constructor.
00322   TAO_ServerProtocolPolicy (const TAO_ServerProtocolPolicy &rhs);
00323 
00324   /**
00325    * Accessor to the underlying protocols list of the policy (does not
00326    * make a copy like the idl accessor <protocols> implementation
00327    * below.)
00328    */
00329   RTCORBA::ProtocolList & protocols_rep (void);
00330 
00331   RTCORBA::ProtocolList *protocols
00332   (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00333     ACE_THROW_SPEC ((CORBA::SystemException));
00334 
00335   CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00336     ACE_THROW_SPEC ((CORBA::SystemException));
00337 
00338   CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00339     ACE_THROW_SPEC ((CORBA::SystemException));
00340 
00341   void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00342     ACE_THROW_SPEC ((CORBA::SystemException));
00343 
00344   // Return the cached policy type for this policy.
00345   TAO_Cached_Policy_Type _tao_cached_type (void) const;
00346 
00347   // Returns the scope at which this policy can be applied. See orbconf.h.
00348   TAO_Policy_Scope _tao_scope (void) const;
00349 
00350   /// Helper method for the implementation of
00351   /// CORBA::ORB::create_policy.
00352   static CORBA::Policy_ptr create (const CORBA::Any &val
00353                                    ACE_ENV_ARG_DECL);
00354 
00355 protected:
00356 
00357   /// Protected destructor to enforce proper memory management of this
00358   /// reference counted object.
00359   virtual ~TAO_ServerProtocolPolicy (void);
00360 
00361 private:
00362 
00363   /// Attribute.
00364   RTCORBA::ProtocolList protocols_;
00365 };
00366 
00367 //*************************************************************************
00368 
00369 /**
00370  * @class TAO_ClientProtocolPolicy
00371  *
00372  * @brief RTCORBA::ClientProtocolPolicy implementation
00373  *
00374  * This policy controls selection and configuration of
00375  * communication protocols on the client-side of the RT ORB.
00376  */
00377 class TAO_RTCORBA_Export TAO_ClientProtocolPolicy
00378   : public RTCORBA::ClientProtocolPolicy,
00379     public TAO_Local_RefCounted_Object
00380 {
00381 public:
00382   /// Constructor.
00383   TAO_ClientProtocolPolicy (const RTCORBA::ProtocolList &protocols);
00384 
00385   /// Copy constructor.
00386   TAO_ClientProtocolPolicy (const TAO_ClientProtocolPolicy &rhs);
00387 
00388   /**
00389    * Accessor to the underlying protocols list of the policy (does not
00390    * make a copy like the idl accessor <protocols> implementation
00391    * below.)
00392    */
00393   RTCORBA::ProtocolList & protocols_rep (void);
00394 
00395   RTCORBA::ProtocolList *protocols
00396   (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00397     ACE_THROW_SPEC ((CORBA::SystemException));
00398 
00399   CORBA::PolicyType policy_type (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00400     ACE_THROW_SPEC ((CORBA::SystemException));
00401 
00402   CORBA::Policy_ptr copy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00403     ACE_THROW_SPEC ((CORBA::SystemException));
00404 
00405   void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00406     ACE_THROW_SPEC ((CORBA::SystemException));
00407 
00408   // = CDR Encoder/Decoder.
00409 
00410   /// This method writes a CDR representation of the current object.
00411   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00412 
00413   /// This method reads the object state from a CDR representation.
00414   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00415 
00416   // Return the cached policy type for this policy.
00417   TAO_Cached_Policy_Type _tao_cached_type (void) const;
00418 
00419   // Returns the scope at which this policy can be applied. See orbconf.h.
00420   TAO_Policy_Scope _tao_scope (void) const;
00421 
00422   /// Helper method for the implementation of
00423   /// CORBA::ORB::create_policy.
00424   static CORBA::Policy_ptr create (const CORBA::Any &val
00425                                    ACE_ENV_ARG_DECL);
00426 
00427 protected:
00428 
00429   /// Protected destructor to enforce proper memory management of this
00430   /// reference counted object.
00431   virtual ~TAO_ClientProtocolPolicy (void);
00432 
00433   /// This constructor is used by TAO_RT_PolicyFactory when decoding
00434   /// policies from tagged components in an IOR.
00435   friend class TAO_RT_PolicyFactory;
00436   TAO_ClientProtocolPolicy (void);
00437 
00438 private:
00439 
00440   /// Attribute.
00441   RTCORBA::ProtocolList protocols_;
00442 };
00443 
00444 //*************************************************************************
00445 
00446 /**
00447  * @class TAO_TCP_Protocol_Properties
00448  *
00449  * @brief RTCORBA::TCPProtocolProperties implementation
00450  *
00451  * Stores TCP Protocol configuration properties.
00452  */
00453 class TAO_RTCORBA_Export TAO_TCP_Protocol_Properties
00454   : public RTCORBA::TCPProtocolProperties,
00455     public TAO_Local_RefCounted_Object
00456 {
00457 public:
00458   /// Constructor.
00459   TAO_TCP_Protocol_Properties (CORBA::Long send_buffer_size,
00460                                CORBA::Long recv_buffer_size,
00461                                CORBA::Boolean keep_alive,
00462                                CORBA::Boolean dont_route,
00463                                CORBA::Boolean no_delay,
00464                                CORBA::Boolean enable_network_priority);
00465 
00466   CORBA::Long send_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00467     ACE_THROW_SPEC ((CORBA::SystemException));
00468 
00469   void send_buffer_size (CORBA::Long send_buffer_size
00470                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00471     ACE_THROW_SPEC ((CORBA::SystemException));
00472 
00473   CORBA::Long recv_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00474     ACE_THROW_SPEC ((CORBA::SystemException));
00475 
00476   void recv_buffer_size (CORBA::Long recv_buffer_size
00477                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00478     ACE_THROW_SPEC ((CORBA::SystemException));
00479 
00480   CORBA::Boolean keep_alive (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00481     ACE_THROW_SPEC ((CORBA::SystemException));
00482 
00483   void keep_alive (CORBA::Boolean keep_alive
00484                    ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00485     ACE_THROW_SPEC ((CORBA::SystemException));
00486 
00487   CORBA::Boolean dont_route (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00488     ACE_THROW_SPEC ((CORBA::SystemException));
00489 
00490   void dont_route (CORBA::Boolean dont_route
00491                    ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00492     ACE_THROW_SPEC ((CORBA::SystemException));
00493 
00494   CORBA::Boolean no_delay (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00495     ACE_THROW_SPEC ((CORBA::SystemException));
00496 
00497   void no_delay (CORBA::Boolean no_delay
00498                  ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00499     ACE_THROW_SPEC ((CORBA::SystemException));
00500 
00501   CORBA::Boolean enable_network_priority (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00502     ACE_THROW_SPEC ((CORBA::SystemException));
00503 
00504   void enable_network_priority (CORBA::Boolean enable
00505                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00506     ACE_THROW_SPEC ((CORBA::SystemException));
00507 
00508   /// This method writes a CDR representation of TCPProtocolProperties.
00509   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00510 
00511   /// This method reads the object state from a CDR representation.
00512   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00513 
00514 protected:
00515 
00516   /// Protected destructor to enforce proper memory management of this
00517   /// reference counted object.
00518   virtual ~TAO_TCP_Protocol_Properties (void);
00519 
00520 private:
00521   // = Attributes.
00522 
00523   CORBA::Long send_buffer_size_;
00524   CORBA::Long recv_buffer_size_;
00525   CORBA::Boolean keep_alive_;
00526   CORBA::Boolean dont_route_;
00527   CORBA::Boolean no_delay_;
00528   CORBA::Boolean enable_network_priority_;
00529 };
00530 
00531 //*************************************************************************
00532 
00533 /**
00534  * @class TAO_UnixDomain_Protocol_Properties
00535  *
00536  * @brief RTCORBA::UnixDomainProtocolProperties implementation.
00537  *
00538  * Stores Unix Domain Sockets (Local IPC) Protocol configuration
00539  * properties.
00540  */
00541 class TAO_RTCORBA_Export TAO_UnixDomain_Protocol_Properties
00542   : public RTCORBA::UnixDomainProtocolProperties,
00543     public TAO_Local_RefCounted_Object
00544 {
00545 public:
00546 
00547   /// Constructor
00548   TAO_UnixDomain_Protocol_Properties (CORBA::Long send_buffer_size,
00549                                       CORBA::Long recv_buffer_size);
00550 
00551   CORBA::Long send_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00552     ACE_THROW_SPEC ((CORBA::SystemException));
00553 
00554   void send_buffer_size (CORBA::Long send_buffer_size
00555                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00556     ACE_THROW_SPEC ((CORBA::SystemException));
00557 
00558   CORBA::Long recv_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00559     ACE_THROW_SPEC ((CORBA::SystemException));
00560 
00561   void recv_buffer_size (CORBA::Long recv_buffer_size
00562                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00563     ACE_THROW_SPEC ((CORBA::SystemException));
00564 
00565   /**
00566    * This method writes the CDR encapsulation of an instance of
00567    * UnixDomainProperties. This Protocol Property in TAO specific,
00568    * so there is no order of encapsulation specified in the
00569    * RT CORBA Spec. The current implementation encodes the field
00570    * according to the order of declaration (i.e. first is encoded
00571    * send_buffer_size and then recv_buffer_size).
00572    */
00573   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00574 
00575   /**
00576    * This method reads an instance of UnixDomainProperties from
00577    * a CDR encapsulation. This Protocol Property in TAO specific,
00578    * so there is no order of encapsulation specified in the
00579    * RT CORBA Spec. The current implementation expect the field
00580    * according to the order of declaration.
00581    */
00582   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00583 
00584 protected:
00585 
00586   /// Protected destructor to enforce proper memory management of this
00587   /// reference counted object.
00588   virtual ~TAO_UnixDomain_Protocol_Properties (void);
00589 
00590 private:
00591 
00592   // = Attributes.
00593   CORBA::Long send_buffer_size_;
00594   CORBA::Long recv_buffer_size_;
00595 };
00596 
00597 //*************************************************************************
00598 
00599 /**
00600  * @class TAO_SharedMemory_Protocol_Properties
00601  *
00602  * @brief RTCORBA::SharedMemoryProtocolProperties implementation.
00603  *
00604  * Stores Shared Memory Protocol configuration
00605  * properties.
00606  */
00607 class TAO_RTCORBA_Export TAO_SharedMemory_Protocol_Properties
00608   : public RTCORBA::SharedMemoryProtocolProperties,
00609     public TAO_Local_RefCounted_Object
00610 {
00611 public:
00612   /// Constructor.
00613   TAO_SharedMemory_Protocol_Properties (CORBA::Long send_buffer_size,
00614                                         CORBA::Long recv_buffer_size,
00615                                         CORBA::Boolean keep_alive,
00616                                         CORBA::Boolean dont_route,
00617                                         CORBA::Boolean no_delay,
00618                                         CORBA::Long preallocate_buffer_size,
00619                                         const char *mmap_filename,
00620                                         const char *mmap_lockname);
00621 
00622   // = IDL interface methods.
00623 
00624   CORBA::Long send_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00625     ACE_THROW_SPEC ((CORBA::SystemException));
00626 
00627   void send_buffer_size (CORBA::Long send_buffer_size
00628                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00629     ACE_THROW_SPEC ((CORBA::SystemException));
00630 
00631   CORBA::Long recv_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00632     ACE_THROW_SPEC ((CORBA::SystemException));
00633 
00634   void recv_buffer_size (CORBA::Long recv_buffer_size
00635                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00636     ACE_THROW_SPEC ((CORBA::SystemException));
00637 
00638   CORBA::Boolean keep_alive (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00639     ACE_THROW_SPEC ((CORBA::SystemException));
00640 
00641   void keep_alive (CORBA::Boolean keep_alive
00642                    ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00643     ACE_THROW_SPEC ((CORBA::SystemException));
00644 
00645   CORBA::Boolean dont_route (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00646     ACE_THROW_SPEC ((CORBA::SystemException));
00647 
00648   void dont_route (CORBA::Boolean dont_route
00649                    ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00650     ACE_THROW_SPEC ((CORBA::SystemException));
00651 
00652   CORBA::Boolean no_delay (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00653     ACE_THROW_SPEC ((CORBA::SystemException));
00654 
00655   void no_delay (CORBA::Boolean no_delay
00656                  ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00657     ACE_THROW_SPEC ((CORBA::SystemException));
00658 
00659   CORBA::Boolean enable_network_priority (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00660     ACE_THROW_SPEC ((CORBA::SystemException));
00661 
00662   CORBA::Long preallocate_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00663     ACE_THROW_SPEC ((CORBA::SystemException));
00664 
00665   void preallocate_buffer_size (CORBA::Long preallocate_buffer_size
00666                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00667     ACE_THROW_SPEC ((CORBA::SystemException));
00668 
00669   char *mmap_filename (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00670     ACE_THROW_SPEC ((CORBA::SystemException));
00671 
00672   void mmap_filename (const char *mmap_filename
00673                       ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00674     ACE_THROW_SPEC ((CORBA::SystemException));
00675 
00676   char *mmap_lockname (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00677     ACE_THROW_SPEC ((CORBA::SystemException));
00678 
00679   void mmap_lockname (const char *mmap_lockname
00680                       ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00681     ACE_THROW_SPEC ((CORBA::SystemException));
00682 
00683   /**
00684    * This method writes the CDR encapsulation of an instance of
00685    * SharedMemoryProperties. This Protocol Property in TAO specific,
00686    * so there is no order of encapsulation specified in the
00687    * RT CORBA Spec. The current implementation encodes the field
00688    * according to the order of declaration.
00689    */
00690   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00691 
00692   /**
00693    * This method reads an instance of SharedMemoryProperties from
00694    * a CDR encapsulation. This Protocol Property in TAO specific,
00695    * so there is no order of encapsulation specified in the
00696    * RT CORBA Spec. The current implementation expect the field
00697    * according to the order of declaration.
00698    */
00699   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00700 
00701 protected:
00702 
00703   /// Protected destructor to enforce proper memory management of this
00704   /// reference counted object.
00705   virtual ~TAO_SharedMemory_Protocol_Properties (void);
00706 
00707 private:
00708 
00709   // = Attributes.
00710   CORBA::Long send_buffer_size_;
00711   CORBA::Long recv_buffer_size_;
00712   CORBA::Boolean keep_alive_;
00713   CORBA::Boolean dont_route_;
00714   CORBA::Boolean no_delay_;
00715   CORBA::Long preallocate_buffer_size_;
00716   ACE_CString mmap_filename_;
00717   ACE_CString mmap_lockname_;
00718 };
00719 
00720 //*************************************************************************
00721 
00722 /**
00723  * @class TAO_UserDatagram_Protocol_Properties
00724  *
00725  * @brief RTCORBA::UserDatagramProtocolProperties implementation
00726  *
00727  * Stores UserDatagram Protocol configuration properties.
00728  */
00729 class TAO_RTCORBA_Export TAO_UserDatagram_Protocol_Properties
00730   : public RTCORBA::UserDatagramProtocolProperties,
00731     public TAO_Local_RefCounted_Object
00732 {
00733 public:
00734   /// Constructor.
00735   TAO_UserDatagram_Protocol_Properties (CORBA::Boolean enable_network_priority);
00736 
00737   CORBA::Boolean enable_network_priority (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00738     ACE_THROW_SPEC ((CORBA::SystemException));
00739 
00740   void enable_network_priority (CORBA::Boolean enable
00741                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00742     ACE_THROW_SPEC ((CORBA::SystemException));
00743 
00744   /// This method writes a CDR representation of UserDatagramProtocolProperties.
00745   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00746 
00747   /// This method reads the object state from a CDR representation.
00748   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00749 
00750 protected:
00751 
00752   /// Protected destructor to enforce proper memory management of this
00753   /// reference counted object.
00754   virtual ~TAO_UserDatagram_Protocol_Properties (void);
00755 
00756 private:
00757   // = Attributes.
00758 
00759   CORBA::Boolean enable_network_priority_;
00760 };
00761 
00762 //*************************************************************************
00763 
00764 /**
00765  * @class TAO_StreamControl_Protocol_Properties
00766  *
00767  * @brief RTCORBA::StreamControlProtocolProperties implementation
00768  *
00769  * Stores StreamControl Protocol configuration properties.
00770  */
00771 class TAO_RTCORBA_Export TAO_StreamControl_Protocol_Properties
00772   : public RTCORBA::StreamControlProtocolProperties,
00773     public TAO_Local_RefCounted_Object
00774 {
00775 public:
00776   /// Constructor.
00777   TAO_StreamControl_Protocol_Properties (CORBA::Long send_buffer_size,
00778                                          CORBA::Long recv_buffer_size,
00779                                          CORBA::Boolean keep_alive,
00780                                          CORBA::Boolean dont_route,
00781                                          CORBA::Boolean no_delay,
00782                                          CORBA::Boolean enable_network_priority);
00783 
00784   CORBA::Long send_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00785     ACE_THROW_SPEC ((CORBA::SystemException));
00786 
00787   void send_buffer_size (CORBA::Long send_buffer_size
00788                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00789     ACE_THROW_SPEC ((CORBA::SystemException));
00790 
00791   CORBA::Long recv_buffer_size (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00792     ACE_THROW_SPEC ((CORBA::SystemException));
00793 
00794   void recv_buffer_size (CORBA::Long recv_buffer_size
00795                          ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00796     ACE_THROW_SPEC ((CORBA::SystemException));
00797 
00798   CORBA::Boolean keep_alive (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00799     ACE_THROW_SPEC ((CORBA::SystemException));
00800 
00801   void keep_alive (CORBA::Boolean keep_alive
00802                    ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00803     ACE_THROW_SPEC ((CORBA::SystemException));
00804 
00805   CORBA::Boolean dont_route (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00806     ACE_THROW_SPEC ((CORBA::SystemException));
00807 
00808   void dont_route (CORBA::Boolean dont_route
00809                    ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00810     ACE_THROW_SPEC ((CORBA::SystemException));
00811 
00812   CORBA::Boolean no_delay (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00813     ACE_THROW_SPEC ((CORBA::SystemException));
00814 
00815   void no_delay (CORBA::Boolean no_delay
00816                  ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00817     ACE_THROW_SPEC ((CORBA::SystemException));
00818 
00819   CORBA::Boolean enable_network_priority (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00820     ACE_THROW_SPEC ((CORBA::SystemException));
00821 
00822   void enable_network_priority (CORBA::Boolean enable
00823                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00824     ACE_THROW_SPEC ((CORBA::SystemException));
00825 
00826   /// This method writes a CDR representation of StreamControlProtocolProperties.
00827   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00828 
00829   /// This method reads the object state from a CDR representation.
00830   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00831 
00832 protected:
00833 
00834   /// Protected destructor to enforce proper memory management of this
00835   /// reference counted object.
00836   virtual ~TAO_StreamControl_Protocol_Properties (void);
00837 
00838 private:
00839   // = Attributes.
00840 
00841   CORBA::Long send_buffer_size_;
00842   CORBA::Long recv_buffer_size_;
00843   CORBA::Boolean keep_alive_;
00844   CORBA::Boolean dont_route_;
00845   CORBA::Boolean no_delay_;
00846   CORBA::Boolean enable_network_priority_;
00847 };
00848 
00849 //*************************************************************************
00850 
00851 class TAO_RTCORBA_Export TAO_GIOP_Protocol_Properties
00852   : public RTCORBA::GIOPProtocolProperties,
00853     public TAO_Local_RefCounted_Object
00854 {
00855 public:
00856 
00857   // = CDR encoding methods
00858   CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
00859   CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
00860 
00861 protected:
00862 
00863   /// Protected destructor to enforce proper memory management of this
00864   /// reference counted object.
00865   virtual ~TAO_GIOP_Protocol_Properties ();
00866 
00867   friend class TAO_Protocol_Properties_Factory;
00868   TAO_GIOP_Protocol_Properties (void);
00869 };
00870 
00871 //*************************************************************************
00872 
00873 class TAO_RTCORBA_Export TAO_Protocol_Properties_Factory
00874 {
00875 public:
00876 
00877   /**
00878    * Creates the proper transport ProtocolProperties subclass that matches
00879    * the IOP::ProfileId.
00880    * NOTE: Each IOP::ProfileId corresponds to two sets of protocol
00881    * properties: one describes the transport protocol and the other
00882    * describes the ORB messaging protocol.
00883    */
00884   static RTCORBA::ProtocolProperties *create_transport_protocol_property (
00885       IOP::ProfileId id,
00886       TAO_ORB_Core *orb_core);
00887 
00888   /**
00889    * Creates the proper orb ProtocolProperties subclass for
00890    * IOP::ProfileId.
00891    * NOTE: Each IOP::ProfileId corresponds to two sets of protocol
00892    * properties: one describes the transport protocol and the other
00893    * describes the ORB messaging protocol.
00894    */
00895   static RTCORBA::ProtocolProperties *create_orb_protocol_property (IOP::ProfileId id);
00896 
00897 private:
00898 
00899   TAO_Protocol_Properties_Factory (void);
00900 };
00901 
00902 TAO_END_VERSIONED_NAMESPACE_DECL
00903 
00904 #if defined(_MSC_VER)
00905 #pragma warning(pop)
00906 #endif /* _MSC_VER */
00907 
00908 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
00909 
00910 #include /**/ "ace/post.h"
00911 
00912 #endif /* TAO_RT_POLICY_I_H */

Generated on Thu Nov 9 12:58:01 2006 for TAO_RTCORBA by doxygen 1.3.6