3 // ===================================================================
5 * @file Protocols_Hooks.h
7 * @author Priyanka Gontla <pgontla@ece.uci.edu>
9 // ===================================================================
11 #ifndef TAO_PROTOCOLS_HOOKS_H
12 #define TAO_PROTOCOLS_HOOKS_H
14 #include /**/ "ace/pre.h"
16 #include "ace/Service_Object.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include /**/ "tao/TAO_Export.h"
23 #include "tao/Basic_Types.h"
25 #include "ace/SString.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
35 class TAO_Service_Context
;
36 class TAO_Connection_Handler
;
39 class TAO_Export TAO_IIOP_Protocol_Properties
42 TAO_IIOP_Protocol_Properties ();
44 CORBA::Long send_buffer_size_
;
45 CORBA::Long recv_buffer_size_
;
49 CORBA::Boolean enable_network_priority_
;
50 CORBA::Long hop_limit_
;
53 class TAO_Export TAO_UIOP_Protocol_Properties
56 TAO_UIOP_Protocol_Properties ();
58 CORBA::Long send_buffer_size_
;
59 CORBA::Long recv_buffer_size_
;
62 class TAO_Export TAO_SHMIOP_Protocol_Properties
65 TAO_SHMIOP_Protocol_Properties ();
67 CORBA::Long send_buffer_size_
;
68 CORBA::Long recv_buffer_size_
;
72 CORBA::Long preallocate_buffer_size_
;
73 ACE_CString mmap_filename_
;
74 ACE_CString mmap_lockname_
;
77 class TAO_Export TAO_DIOP_Protocol_Properties
80 TAO_DIOP_Protocol_Properties ();
82 CORBA::Long send_buffer_size_
;
83 CORBA::Long recv_buffer_size_
;
84 CORBA::Boolean enable_network_priority_
;
85 CORBA::Long hop_limit_
;
86 CORBA::Boolean enable_multicast_loop_
;
89 class TAO_Export TAO_SCIOP_Protocol_Properties
92 TAO_SCIOP_Protocol_Properties ();
94 CORBA::Long send_buffer_size_
;
95 CORBA::Long recv_buffer_size_
;
99 CORBA::Boolean enable_network_priority_
;
100 CORBA::Long hop_limit_
;
103 class TAO_Export TAO_Protocols_Hooks
: public ACE_Service_Object
107 virtual ~TAO_Protocols_Hooks ();
109 /// Initialize the protocols hooks instance.
110 virtual void init_hooks (TAO_ORB_Core
*orb_core
) = 0;
112 virtual CORBA::Boolean
set_client_network_priority (
113 IOP::ProfileId protocol_tag
,
116 virtual CORBA::Boolean
set_server_network_priority (
117 IOP::ProfileId protocol_tag
,
118 CORBA::Policy
*policy
) = 0;
120 virtual void server_protocol_properties_at_orb_level (
121 TAO_IIOP_Protocol_Properties
&protocol_properties
) = 0;
123 virtual void client_protocol_properties_at_orb_level (
124 TAO_IIOP_Protocol_Properties
&protocol_properties
) = 0;
126 virtual void server_protocol_properties_at_orb_level (
127 TAO_UIOP_Protocol_Properties
&protocol_properties
) = 0;
129 virtual void client_protocol_properties_at_orb_level (
130 TAO_UIOP_Protocol_Properties
&protocol_properties
) = 0;
132 virtual void server_protocol_properties_at_orb_level (
133 TAO_SHMIOP_Protocol_Properties
&protocol_properties
) = 0;
135 virtual void client_protocol_properties_at_orb_level (
136 TAO_SHMIOP_Protocol_Properties
&protocol_properties
) = 0;
138 virtual void server_protocol_properties_at_orb_level (
139 TAO_DIOP_Protocol_Properties
&protocol_properties
) = 0;
141 virtual void client_protocol_properties_at_orb_level (
142 TAO_DIOP_Protocol_Properties
&protocol_properties
) = 0;
144 virtual void server_protocol_properties_at_orb_level (
145 TAO_SCIOP_Protocol_Properties
&protocol_properties
) = 0;
147 virtual void client_protocol_properties_at_orb_level (
148 TAO_SCIOP_Protocol_Properties
&protocol_properties
) = 0;
150 virtual CORBA::Long
get_dscp_codepoint () = 0;
152 virtual void get_selector_hook (CORBA::Policy
*model_policy
,
153 CORBA::Boolean
&is_client_propagated
,
154 CORBA::Short
&server_priority
) = 0;
156 virtual void get_selector_bands_policy_hook (CORBA::Policy
*bands_policy
,
157 CORBA::Short priority
,
158 CORBA::Short
&min_priority
,
159 CORBA::Short
&max_priority
,
163 * @name Accessor and modifier to the current thread priority, used to
164 * implement the RTCORBA::Current interface, but it is faster for
165 * some critical components. If the RTCORBA library isn't used,
166 * these operations are no-ops.
169 virtual int get_thread_CORBA_priority (CORBA::Short
&) = 0;
171 virtual int get_thread_native_priority (CORBA::Short
&) = 0;
173 virtual int get_thread_CORBA_and_native_priority (
177 virtual int get_thread_implicit_CORBA_priority (CORBA::Short
&) = 0;
179 virtual int set_thread_CORBA_priority (CORBA::Short
) = 0;
181 virtual int restore_thread_CORBA_and_native_priority (CORBA::Short
,
186 TAO_END_VERSIONED_NAMESPACE_DECL
188 #include /**/ "ace/post.h"
190 #endif /* TAO_PROTOCOLS_HOOKS_H */