RT_Policy_i.h

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

Generated on Tue Feb 2 17:42:49 2010 for TAO_RTCORBA by  doxygen 1.4.7