Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Protocols_Hooks.h
blobd629e049354048380ae77981a7affa4f9d9267e4
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file Protocols_Hooks.h
7 * @author Priyanka Gontla <pgontla@ece.uci.edu>
8 */
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)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include /**/ "tao/TAO_Export.h"
23 #include "tao/Basic_Types.h"
24 #include "tao/IOPC.h"
25 #include "ace/SString.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 namespace CORBA
31 class Policy;
34 class TAO_ORB_Core;
35 class TAO_Service_Context;
36 class TAO_Connection_Handler;
37 class TAO_Stub;
39 class TAO_Export TAO_IIOP_Protocol_Properties
41 public:
42 TAO_IIOP_Protocol_Properties ();
44 CORBA::Long send_buffer_size_;
45 CORBA::Long recv_buffer_size_;
46 int keep_alive_;
47 int dont_route_;
48 int no_delay_;
49 CORBA::Boolean enable_network_priority_;
50 CORBA::Long hop_limit_;
53 class TAO_Export TAO_UIOP_Protocol_Properties
55 public:
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
64 public:
65 TAO_SHMIOP_Protocol_Properties ();
67 CORBA::Long send_buffer_size_;
68 CORBA::Long recv_buffer_size_;
69 int keep_alive_;
70 int dont_route_;
71 int no_delay_;
72 CORBA::Long preallocate_buffer_size_;
73 ACE_CString mmap_filename_;
74 ACE_CString mmap_lockname_;
77 class TAO_Export TAO_DIOP_Protocol_Properties
79 public:
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
91 public:
92 TAO_SCIOP_Protocol_Properties ();
94 CORBA::Long send_buffer_size_;
95 CORBA::Long recv_buffer_size_;
96 int keep_alive_;
97 int dont_route_;
98 int no_delay_;
99 CORBA::Boolean enable_network_priority_;
100 CORBA::Long hop_limit_;
103 class TAO_Export TAO_Protocols_Hooks : public ACE_Service_Object
105 public:
106 /// Destructor
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,
114 TAO_Stub *stub) = 0;
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,
160 bool &in_range) = 0;
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.
168 //@{
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 (
174 CORBA::Short &,
175 CORBA::Short &) = 0;
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,
182 CORBA::Short) = 0;
183 //@}
186 TAO_END_VERSIONED_NAMESPACE_DECL
188 #include /**/ "ace/post.h"
190 #endif /* TAO_PROTOCOLS_HOOKS_H */