1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
// -*- C++ -*-
// ===================================================================
/**
* @file Protocols_Hooks.h
*
* $Id$
*
* @author Priyanka Gontla <pgontla@ece.uci.edu>
*
*/
// ===================================================================
#ifndef TAO_PROTOCOLS_HOOKS_H
#define TAO_PROTOCOLS_HOOKS_H
#include "ace/pre.h"
#include "RTCORBAC.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Service_Object.h"
class TAO_ORB_Core;
class TAO_GIOP_Invocation;
class TAO_Resource_Factory;
class TAO_Export TAO_Protocols_Hooks : public ACE_Service_Object
{
public:
/// constructor
TAO_Protocols_Hooks (void);
/// destructor
virtual ~TAO_Protocols_Hooks (void);
virtual int call_client_protocols_hook (TAO_ORB_Core *orb_core,
int &send_buffer_size,
int &recv_buffer_size,
int &no_delay,
const char *protocol_type);
virtual int call_server_protocols_hook (TAO_ORB_Core *orb_core,
int &send_buffer_size,
int &recv_buffer_size,
int &no_delay,
const char *protocol_type);
/**
* to get the policy_type in Long format.
*
*/
virtual void call_policy_type_hook (CORBA::PolicyList *&policy_list,
CORBA::ULong &policy_type);
virtual void validate_policy_type (CORBA::ULong slot,
CORBA::ULong &type_value,
CORBA::Environment &ACE_TRY_ENV);
virtual void add_rt_service_context_hook (
TAO_GIOP_Invocation *invocation,
CORBA::Policy *model_policy,
CORBA::Short &client_priority,
CORBA::Environment &ACE_TRY_ENV);
virtual void get_selector_hook (CORBA::Policy *model_policy,
CORBA::Boolean
&is_client_propagated,
CORBA::Short &server_priority);
virtual void get_selector_bands_policy_hook (
CORBA::Policy *bands_policy,
CORBA::Short &min_priority,
CORBA::Short &max_priority,
CORBA::Short &p,
int &in_range);
/**
* Hook to check and override the exposed policies if needed
*
*/
virtual CORBA::Policy *effective_priority_banded_connection_hook (CORBA::Policy *override,
CORBA::Policy *exposed,
CORBA::Environment &);
virtual CORBA::Policy *effective_client_protocol_hook (CORBA::Policy *override,
CORBA::Policy *exposed,
CORBA::Environment &);
/**
* Accessor and modifier to the current thread priority, used to
* implement the RTCORBA::Current interface, but it is faster for
* some critical components. If TAO_HAS_RT_CORBA == 0, the
* operations are no-ops.
*/
//@{
virtual int get_thread_priority (TAO_ORB_Core *,
CORBA::Short &,
CORBA::Environment &);
virtual int set_thread_priority (TAO_ORB_Core *,
CORBA::Short,
CORBA::Environment &);
//@}
virtual void set_priority_mapping (TAO_ORB_Core *,
TAO_Resource_Factory *,
CORBA::Environment &);
/// Sets the default_policies for ORB.
/// 1. Sets ORB-level policy defaults for this ORB. Currently sets
/// default RTCORBA policies: ServerProtocolPolicy and
/// ClientProtocolPolicy.
virtual int set_default_policies (TAO_ORB_Core *orb_core);
};
#include "ace/post.h"
#endif /* TAO_PROTOCOLS_HOOKS_H */
|