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
43 TAO_IIOP_Protocol_Properties ();
45 CORBA::Long send_buffer_size_
;
46 CORBA::Long recv_buffer_size_
;
50 CORBA::Boolean enable_network_priority_
;
51 CORBA::Long hop_limit_
;
54 class TAO_Export TAO_UIOP_Protocol_Properties
58 TAO_UIOP_Protocol_Properties ();
60 CORBA::Long send_buffer_size_
;
61 CORBA::Long recv_buffer_size_
;
64 class TAO_Export TAO_SHMIOP_Protocol_Properties
68 TAO_SHMIOP_Protocol_Properties ();
70 CORBA::Long send_buffer_size_
;
71 CORBA::Long recv_buffer_size_
;
75 CORBA::Long preallocate_buffer_size_
;
76 ACE_CString mmap_filename_
;
77 ACE_CString mmap_lockname_
;
80 class TAO_Export TAO_DIOP_Protocol_Properties
84 TAO_DIOP_Protocol_Properties ();
86 CORBA::Long send_buffer_size_
;
87 CORBA::Long recv_buffer_size_
;
88 CORBA::Boolean enable_network_priority_
;
89 CORBA::Long hop_limit_
;
90 CORBA::Boolean enable_multicast_loop_
;
93 class TAO_Export TAO_SCIOP_Protocol_Properties
97 TAO_SCIOP_Protocol_Properties ();
99 CORBA::Long send_buffer_size_
;
100 CORBA::Long recv_buffer_size_
;
104 CORBA::Boolean enable_network_priority_
;
105 CORBA::Long hop_limit_
;
108 class TAO_Export TAO_Protocols_Hooks
: public ACE_Service_Object
112 virtual ~TAO_Protocols_Hooks ();
114 /// Initialize the protocols hooks instance.
115 virtual void init_hooks (TAO_ORB_Core
*orb_core
) = 0;
117 virtual CORBA::Boolean
set_client_network_priority (
118 IOP::ProfileId protocol_tag
,
121 virtual CORBA::Boolean
set_server_network_priority (
122 IOP::ProfileId protocol_tag
,
123 CORBA::Policy
*policy
) = 0;
125 virtual void server_protocol_properties_at_orb_level (
126 TAO_IIOP_Protocol_Properties
&protocol_properties
) = 0;
128 virtual void client_protocol_properties_at_orb_level (
129 TAO_IIOP_Protocol_Properties
&protocol_properties
) = 0;
131 virtual void server_protocol_properties_at_orb_level (
132 TAO_UIOP_Protocol_Properties
&protocol_properties
) = 0;
134 virtual void client_protocol_properties_at_orb_level (
135 TAO_UIOP_Protocol_Properties
&protocol_properties
) = 0;
137 virtual void server_protocol_properties_at_orb_level (
138 TAO_SHMIOP_Protocol_Properties
&protocol_properties
) = 0;
140 virtual void client_protocol_properties_at_orb_level (
141 TAO_SHMIOP_Protocol_Properties
&protocol_properties
) = 0;
143 virtual void server_protocol_properties_at_orb_level (
144 TAO_DIOP_Protocol_Properties
&protocol_properties
) = 0;
146 virtual void client_protocol_properties_at_orb_level (
147 TAO_DIOP_Protocol_Properties
&protocol_properties
) = 0;
149 virtual void server_protocol_properties_at_orb_level (
150 TAO_SCIOP_Protocol_Properties
&protocol_properties
) = 0;
152 virtual void client_protocol_properties_at_orb_level (
153 TAO_SCIOP_Protocol_Properties
&protocol_properties
) = 0;
155 virtual CORBA::Long
get_dscp_codepoint () = 0;
157 virtual void get_selector_hook (CORBA::Policy
*model_policy
,
158 CORBA::Boolean
&is_client_propagated
,
159 CORBA::Short
&server_priority
) = 0;
161 virtual void get_selector_bands_policy_hook (CORBA::Policy
*bands_policy
,
162 CORBA::Short priority
,
163 CORBA::Short
&min_priority
,
164 CORBA::Short
&max_priority
,
168 * @name Accessor and modifier to the current thread priority, used to
169 * implement the RTCORBA::Current interface, but it is faster for
170 * some critical components. If the RTCORBA library isn't used,
171 * these operations are no-ops.
174 virtual int get_thread_CORBA_priority (CORBA::Short
&) = 0;
176 virtual int get_thread_native_priority (CORBA::Short
&) = 0;
178 virtual int get_thread_CORBA_and_native_priority (
182 virtual int get_thread_implicit_CORBA_priority (CORBA::Short
&) = 0;
184 virtual int set_thread_CORBA_priority (CORBA::Short
) = 0;
186 virtual int restore_thread_CORBA_and_native_priority (CORBA::Short
,
191 TAO_END_VERSIONED_NAMESPACE_DECL
193 #include /**/ "ace/post.h"
195 #endif /* TAO_PROTOCOLS_HOOKS_H */