RT_Protocols_Hooks.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   RT_Protocols_Hooks.h
00006  *
00007  *  $Id: RT_Protocols_Hooks.h 78627 2007-06-28 08:50:01Z johnnyw $
00008  *
00009  *  @author Priyanka Gontla <pgontla@ece.uci.edu>
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_RT_PROTOCOLS_HOOKS_H
00014 #define TAO_RT_PROTOCOLS_HOOKS_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 #include "tao/RTCORBA/Priority_Mapping_Manager.h"
00023 #include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
00024 
00025 #include "tao/Protocols_Hooks.h"
00026 
00027 #include "ace/Service_Config.h"
00028 
00029 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00030 # pragma once
00031 #endif /* ACE_LACKS_PRAGMA_ONCE */
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 class TAO_RTCORBA_Export TAO_RT_Protocols_Hooks : public TAO_Protocols_Hooks
00036 {
00037 public:
00038 
00039   /// Constructor
00040   TAO_RT_Protocols_Hooks (void);
00041 
00042   /// Destructor
00043   virtual ~TAO_RT_Protocols_Hooks (void);
00044 
00045   /// Initialize the protocols hooks instance.
00046   void init_hooks (TAO_ORB_Core *orb_core
00047                   );
00048 
00049   CORBA::Boolean set_client_network_priority (IOP::ProfileId protocol_tag,
00050                                               TAO_Stub *stub);
00051 
00052   CORBA::Boolean set_server_network_priority (IOP::ProfileId protocol_tag,
00053                                               CORBA::Policy *policy);
00054 
00055   void server_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties
00056                                                );
00057 
00058   void client_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties
00059                                                );
00060 
00061   void server_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties
00062                                                );
00063 
00064   void client_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties
00065                                                );
00066 
00067   void server_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties
00068                                                );
00069 
00070   void client_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties
00071                                                );
00072 
00073   void server_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties);
00074 
00075   void client_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties);
00076 
00077   void server_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties);
00078 
00079   void client_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties);
00080 
00081   CORBA::Long get_dscp_codepoint (void);
00082 
00083   void rt_service_context (TAO_Stub *stub,
00084                            TAO_Service_Context &service_context,
00085                            CORBA::Boolean restart);
00086 
00087   void add_rt_service_context_hook (TAO_Service_Context &service_context,
00088                                     CORBA::Policy *model_policy,
00089                                     CORBA::Short &client_priority);
00090 
00091   void get_selector_hook (CORBA::Policy *model_policy,
00092                           CORBA::Boolean
00093                           &is_client_propagated,
00094                           CORBA::Short &server_priority);
00095 
00096   void get_selector_bands_policy_hook (CORBA::Policy *bands_policy,
00097                                        CORBA::Short priority,
00098                                        CORBA::Short &min_priority,
00099                                        CORBA::Short &max_priority,
00100                                        bool &in_range);
00101 
00102   /**
00103    * Accessor and modifier to the current thread priority, used to
00104    * implement the RTCORBA::Current interface, but it is faster for
00105    * some critical components.
00106    */
00107   //@{
00108   int get_thread_CORBA_priority (CORBA::Short &);
00109 
00110   int get_thread_native_priority (CORBA::Short &);
00111 
00112   int get_thread_CORBA_and_native_priority (CORBA::Short &, CORBA::Short &);
00113 
00114   int set_thread_CORBA_priority (CORBA::Short);
00115 
00116   int set_thread_native_priority (CORBA::Short);
00117 
00118   //@}
00119 
00120 protected:
00121 
00122   RTCORBA::ProtocolProperties_ptr server_protocol_properties (IOP::ProfileId protocol_tag,
00123                                                               CORBA::Policy_ptr policy
00124                                                              );
00125 
00126   RTCORBA::ProtocolProperties_ptr client_protocol_properties (IOP::ProfileId protocol_tag,
00127                                                               CORBA::Policy_ptr policy);
00128 
00129   RTCORBA::ProtocolProperties_ptr server_protocol_properties_at_orb_level (IOP::ProfileId protocol_tag);
00130 
00131   RTCORBA::ProtocolProperties_ptr client_protocol_properties_at_orb_level (IOP::ProfileId protocol_tag);
00132 
00133   RTCORBA::ProtocolProperties_ptr client_protocol_properties_at_object_level (IOP::ProfileId protocol_tag,
00134                                                                               TAO_Stub *stub);
00135 
00136   void extract_protocol_properties (TAO_IIOP_Protocol_Properties &to,
00137                                     RTCORBA::ProtocolProperties_ptr from);
00138 
00139   void extract_protocol_properties (TAO_UIOP_Protocol_Properties &to,
00140                                     RTCORBA::ProtocolProperties_ptr from);
00141 
00142   void extract_protocol_properties (TAO_SHMIOP_Protocol_Properties &to,
00143                                     RTCORBA::ProtocolProperties_ptr from);
00144 
00145   void extract_protocol_properties (TAO_DIOP_Protocol_Properties &to,
00146                                     RTCORBA::ProtocolProperties_ptr from);
00147 
00148   void extract_protocol_properties (TAO_SCIOP_Protocol_Properties &to,
00149                                     RTCORBA::ProtocolProperties_ptr from);
00150 
00151   CORBA::Boolean set_network_priority (IOP::ProfileId protocol_tag,
00152                                        RTCORBA::ProtocolProperties_ptr protocol_properties);
00153 
00154 protected:
00155 
00156   TAO_ORB_Core *orb_core_;
00157 
00158   // Save a reference to the priority mapping manager.
00159   TAO_Priority_Mapping_Manager_var mapping_manager_;
00160   TAO_Network_Priority_Mapping_Manager_var network_mapping_manager_;
00161 
00162   RTCORBA::Current_var current_;
00163 };
00164 
00165 TAO_END_VERSIONED_NAMESPACE_DECL
00166 
00167 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_RTCORBA, TAO_RT_Protocols_Hooks)
00168 ACE_FACTORY_DECLARE (TAO_RTCORBA, TAO_RT_Protocols_Hooks)
00169 
00170 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
00171 
00172 #include /**/ "ace/post.h"
00173 #endif /* TAO_RT_PROTOCOLS_HOOKS_H */

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