summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-26 17:56:58 +0000
committerjai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-26 17:56:58 +0000
commit43482c3eb3a3bea3c6136777c02df41e373d3351 (patch)
tree5eb87850592145872529bac98982ac894ac4108c
parent9431d54bfefa9b5456a8a612938687da8c44c0e6 (diff)
downloadATCD-43482c3eb3a3bea3c6136777c02df41e373d3351.tar.gz
refactoring protocols hooks
-rw-r--r--TAO/tao/RTCORBA/RT_Policy_Protocols_Hooks.h109
-rw-r--r--TAO/tao/RTCORBA/RT_Protocols_Properties_Protocols_Hooks.h139
-rw-r--r--TAO/tao/RTCORBA/RT_Thread_Priority_Protocols_Hooks.h85
3 files changed, 333 insertions, 0 deletions
diff --git a/TAO/tao/RTCORBA/RT_Policy_Protocols_Hooks.h b/TAO/tao/RTCORBA/RT_Policy_Protocols_Hooks.h
new file mode 100644
index 00000000000..c8e3f43f861
--- /dev/null
+++ b/TAO/tao/RTCORBA/RT_Policy_Protocols_Hooks.h
@@ -0,0 +1,109 @@
+// -*- C++ -*-
+
+// ===================================================================
+/**
+ * @file RT_Policy_Protocols_Hooks.h
+ *
+ * $Id$
+ *
+ * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu>
+ * Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+// ===================================================================
+
+#ifndef TAO_RT_POLICY_PROTOCOLS_HOOKS_H
+#define TAO_RT_POLICY_PROTOCOLS_HOOKS_H
+
+#include /**/ "ace/pre.h"
+
+#include "tao/orbconf.h"
+
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+
+#include "tao/RTCORBA/Priority_Mapping_Manager.h"
+#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
+#include "tao/Policy_Protocols_Hooks.h"
+#include "ace/Service_Config.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+class TAO_RTCORBA_Export TAO_RT_Policy_Protocols_Hooks
+ : public TAO_Policy_Protocols_Hooks
+{
+public:
+
+ /// Constructor
+ TAO_RT_Policy_Protocols_Hooks (void);
+
+ /// Destructor
+ virtual ~TAO_RT_Policy_Protocols_Hooks (void);
+
+ /// Initialize the protocols hooks instance.
+ void init_hooks (TAO_ORB_Core *orb_core
+ ACE_ENV_ARG_DECL);
+
+ CORBA::Boolean set_client_network_priority (IOP::ProfileId protocol_tag,
+ TAO_Stub *stub
+ ACE_ENV_ARG_DECL);
+
+ CORBA::Boolean set_server_network_priority (IOP::ProfileId protocol_tag,
+ CORBA::Policy *policy
+ ACE_ENV_ARG_DECL);
+
+ CORBA::Long get_dscp_codepoint (void);
+
+ void set_dscp_codepoint (CORBA::Long &dscp_codepoint
+ ACE_ENV_ARG_DECL);
+
+ void rt_service_context (TAO_Stub *stub,
+ TAO_Service_Context &service_context,
+ CORBA::Boolean restart
+ ACE_ENV_ARG_DECL);
+
+ void add_rt_service_context_hook (TAO_Service_Context &service_context,
+ CORBA::Policy *model_policy,
+ CORBA::Short &client_priority
+ ACE_ENV_ARG_DECL);
+
+ void get_selector_hook (CORBA::Policy *model_policy,
+ CORBA::Boolean
+ &is_client_propagated,
+ CORBA::Short &server_priority);
+
+ void get_selector_bands_policy_hook (CORBA::Policy *bands_policy,
+ CORBA::Short priority,
+ CORBA::Short &min_priority,
+ CORBA::Short &max_priority,
+ int &in_range);
+
+protected:
+
+ CORBA::Boolean set_network_priority (
+ IOP::ProfileId protocol_tag,
+ RTCORBA::ProtocolProperties_ptr protocol_properties
+ ACE_ENV_ARG_DECL);
+
+protected:
+
+ TAO_ORB_Core *orb_core_;
+
+ // Save a reference to the priority mapping manager.
+ TAO_Priority_Mapping_Manager_var mapping_manager_;
+ TAO_Network_Priority_Mapping_Manager_var network_mapping_manager_;
+
+ RTCORBA::Current_var current_;
+};
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+ACE_STATIC_SVC_DECLARE_EXPORT (TAO_RTCORBA, TAO_RT_Policy_Protocols_Hooks)
+ACE_FACTORY_DECLARE (TAO_RTCORBA, TAO_RT_Policy_Protocols_Hooks)
+
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
+
+#include /**/ "ace/post.h"
+#endif /* TAO_RT_POLICY_PROTOCOLS_HOOKS_H */
diff --git a/TAO/tao/RTCORBA/RT_Protocols_Properties_Protocols_Hooks.h b/TAO/tao/RTCORBA/RT_Protocols_Properties_Protocols_Hooks.h
new file mode 100644
index 00000000000..f2d30c2a0d3
--- /dev/null
+++ b/TAO/tao/RTCORBA/RT_Protocols_Properties_Protocols_Hooks.h
@@ -0,0 +1,139 @@
+// -*- C++ -*-
+
+// ===================================================================
+/**
+ * @file RT_Protocols_Properties_Protocols_Hooks.h
+ *
+ * $Id$
+ *
+ * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu>
+ * Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+// ===================================================================
+
+#ifndef TAO_RT_PROTOCOLS_PROPERTIES_PROTOCOLS_HOOKS_H
+#define TAO_RT_PROTOCOLS_PROPERTIES_PROTOCOLS_HOOKS_H
+
+#include /**/ "ace/pre.h"
+
+#include "tao/orbconf.h"
+
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+
+#include "tao/RTCORBA/Priority_Mapping_Manager.h"
+#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
+#include "tao/Protocols_Properties_Protocols_Hooks.h"
+#include "ace/Service_Config.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+class TAO_RTCORBA_Export TAO_RT_Protocols_Properties_Protocols_Hooks
+ : public TAO_Protocols_Properties_Protocols_Hooks
+{
+public:
+
+ /// Constructor
+ TAO_RT_Protocols_Properties_Protocols_Hooks (void);
+
+ /// Destructor
+ virtual ~TAO_RT_Protocols_Properties_Protocols_Hooks (void);
+
+ /// Initialize the protocols hooks instance.
+ void init_hooks (TAO_ORB_Core *orb_core
+ ACE_ENV_ARG_DECL);
+
+ void server_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void client_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void server_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void client_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void server_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void client_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void server_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void client_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void server_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+ void client_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties
+ ACE_ENV_ARG_DECL);
+
+protected:
+
+ RTCORBA::ProtocolProperties_ptr server_protocol_properties (IOP::ProfileId protocol_tag,
+ CORBA::Policy_ptr policy
+ ACE_ENV_ARG_DECL);
+
+ RTCORBA::ProtocolProperties_ptr client_protocol_properties (IOP::ProfileId protocol_tag,
+ CORBA::Policy_ptr policy
+ ACE_ENV_ARG_DECL);
+
+ RTCORBA::ProtocolProperties_ptr server_protocol_properties_at_orb_level (IOP::ProfileId protocol_tag
+ ACE_ENV_ARG_DECL);
+
+ RTCORBA::ProtocolProperties_ptr client_protocol_properties_at_orb_level (IOP::ProfileId protocol_tag
+ ACE_ENV_ARG_DECL);
+
+ RTCORBA::ProtocolProperties_ptr client_protocol_properties_at_object_level (IOP::ProfileId protocol_tag,
+ TAO_Stub *stub
+ ACE_ENV_ARG_DECL);
+
+ void extract_protocol_properties (TAO_IIOP_Protocol_Properties &to,
+ RTCORBA::ProtocolProperties_ptr from
+ ACE_ENV_ARG_DECL);
+
+ void extract_protocol_properties (TAO_UIOP_Protocol_Properties &to,
+ RTCORBA::ProtocolProperties_ptr from
+ ACE_ENV_ARG_DECL);
+
+ void extract_protocol_properties (TAO_SHMIOP_Protocol_Properties &to,
+ RTCORBA::ProtocolProperties_ptr from
+ ACE_ENV_ARG_DECL);
+
+ void extract_protocol_properties (TAO_DIOP_Protocol_Properties &to,
+ RTCORBA::ProtocolProperties_ptr from
+ ACE_ENV_ARG_DECL);
+
+ void extract_protocol_properties (TAO_SCIOP_Protocol_Properties &to,
+ RTCORBA::ProtocolProperties_ptr from
+ ACE_ENV_ARG_DECL);
+
+protected:
+
+ TAO_ORB_Core *orb_core_;
+
+ // Save a reference to the priority mapping manager.
+ TAO_Priority_Mapping_Manager_var mapping_manager_;
+ TAO_Network_Priority_Mapping_Manager_var network_mapping_manager_;
+
+ RTCORBA::Current_var current_;
+};
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+ACE_STATIC_SVC_DECLARE_EXPORT (TAO_RTCORBA,
+ TAO_RT_Protocols_Properties_Protocols_Hooks)
+ACE_FACTORY_DECLARE (TAO_RTCORBA, TAO_RT_Protocols_Properties_Protocols_Hooks)
+
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
+
+#include /**/ "ace/post.h"
+#endif /* TAO_RT_PROTOCOLS_PROPERTIES_PROTOCOLS_HOOKS_H */
diff --git a/TAO/tao/RTCORBA/RT_Thread_Priority_Protocols_Hooks.h b/TAO/tao/RTCORBA/RT_Thread_Priority_Protocols_Hooks.h
new file mode 100644
index 00000000000..92a2180e5cb
--- /dev/null
+++ b/TAO/tao/RTCORBA/RT_Thread_Priority_Protocols_Hooks.h
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+
+// ===================================================================
+/**
+ * @file RT_Thread_Priority_Protocols_Hooks.h
+ *
+ * $Id$
+ *
+ * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu>
+ * Johnny Willemsen <jwillemsen@remedy.nl>
+ */
+// ===================================================================
+
+#ifndef TAO_RT_THREAD_PRIORITY_PROTOCOLS_HOOKS_H
+#define TAO_RT_THREAD_PRIORITY_PROTOCOLS_HOOKS_H
+
+#include /**/ "ace/pre.h"
+
+#include "tao/orbconf.h"
+
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+
+#include "tao/RTCORBA/Priority_Mapping_Manager.h"
+#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
+#include "tao/Thread_Priority_Protocols_Hooks.h"
+#include "ace/Service_Config.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+class TAO_RTCORBA_Export TAO_RT_Thread_Priority_Protocols_Hooks
+ : public TAO_Thread_Priority_Protocols_Hooks
+{
+public:
+
+ /// Constructor
+ TAO_RT_Thread_Priority_Protocols_Hooks (void);
+
+ /// Destructor
+ virtual ~TAO_RT_Thread_Priority_Protocols_Hooks (void);
+
+ /// Initialize the protocols hooks instance.
+ void init_hooks (TAO_ORB_Core *orb_core
+ ACE_ENV_ARG_DECL);
+
+ int get_thread_CORBA_priority (CORBA::Short &
+ ACE_ENV_ARG_DECL);
+
+ int get_thread_native_priority (CORBA::Short &
+ ACE_ENV_ARG_DECL);
+
+ int get_thread_CORBA_and_native_priority (CORBA::Short &,
+ CORBA::Short &
+ ACE_ENV_ARG_DECL);
+
+ int set_thread_CORBA_priority (CORBA::Short
+ ACE_ENV_ARG_DECL);
+
+ int set_thread_native_priority (CORBA::Short
+ ACE_ENV_ARG_DECL);
+
+protected:
+
+ TAO_ORB_Core *orb_core_;
+
+ // Save a reference to the priority mapping manager.
+ TAO_Priority_Mapping_Manager_var mapping_manager_;
+ TAO_Network_Priority_Mapping_Manager_var network_mapping_manager_;
+
+ RTCORBA::Current_var current_;
+};
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+ACE_STATIC_SVC_DECLARE_EXPORT (TAO_RTCORBA,
+ TAO_RT_Thread_Priority_Protocols_Hooks)
+ACE_FACTORY_DECLARE (TAO_RTCORBA, TAO_RT_Thread_Priority_Protocols_Hooks)
+
+#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
+
+#include /**/ "ace/post.h"
+#endif /* TAO_RT_THREAD_PRIORITY_PROTOCOLS_HOOKS_H */