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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
// $Id$
#include "Dynamic_Adapter_Impl.h"
ACE_RCSID(DynamicInterface, TAO_Dynamic_Adapter_Impl, "$Id$")
#include "Request.h"
#include "Server_Request.h"
#include "tao/Invocation.h"
#include "tao/ORB_Core.h"
TAO_Dynamic_Adapter_Impl::TAO_Dynamic_Adapter_Impl (void)
{
}
TAO_Dynamic_Adapter_Impl::~TAO_Dynamic_Adapter_Impl (void)
{
}
void
TAO_Dynamic_Adapter_Impl::create_request (
CORBA::Object_ptr obj,
CORBA::ORB_ptr orb,
const char *operation,
CORBA::NVList_ptr arg_list,
CORBA::NamedValue_ptr result,
CORBA::ExceptionList_ptr exceptions,
CORBA::Request_ptr &request,
CORBA::Flags req_flags,
CORBA_Environment &ACE_TRY_ENV
)
{
ACE_NEW_THROW_EX (request,
CORBA::Request (obj,
orb,
operation,
arg_list,
result,
req_flags,
exceptions,
ACE_TRY_ENV),
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
ENOMEM
),
CORBA::COMPLETED_MAYBE
));
}
CORBA::Request_ptr
TAO_Dynamic_Adapter_Impl::request (CORBA::Object_ptr obj,
CORBA::ORB_ptr orb,
const char *operation,
CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Request_ptr req = CORBA::Request::_nil ();
ACE_NEW_THROW_EX (req,
CORBA::Request (obj,
orb,
operation,
ACE_TRY_ENV),
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
ENOMEM
),
CORBA::COMPLETED_MAYBE
));
ACE_CHECK_RETURN (CORBA::Request::_nil ());
return req;
}
CORBA::Boolean
TAO_Dynamic_Adapter_Impl::context_is_nil (CORBA::Context_ptr ctx)
{
return ctx == 0;
}
void
TAO_Dynamic_Adapter_Impl::context_release (CORBA::Context_ptr ctx)
{
if (ctx != 0)
{
ctx->_decr_refcnt ();
}
}
CORBA::Boolean
TAO_Dynamic_Adapter_Impl::request_is_nil (CORBA::Request_ptr req)
{
return req == 0;
}
void
TAO_Dynamic_Adapter_Impl::request_release (CORBA::Request_ptr req)
{
if (req != 0)
{
req->_decr_refcnt ();
}
}
CORBA::Boolean
TAO_Dynamic_Adapter_Impl::server_request_is_nil (CORBA::ServerRequest_ptr req)
{
return req == 0;
}
void
TAO_Dynamic_Adapter_Impl::server_request_release (CORBA::ServerRequest_ptr req)
{
if (req != 0)
{
req->_decr_refcnt ();
}
}
void
TAO_Dynamic_Adapter_Impl::create_exception_list (
CORBA::ExceptionList_ptr &list,
CORBA_Environment &ACE_TRY_ENV
)
{
ACE_NEW_THROW_EX (list,
CORBA::ExceptionList,
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
ENOMEM
),
CORBA::COMPLETED_NO
));
}
int
TAO_Dynamic_Adapter_Impl::Initializer (void)
{
TAO_ORB_Core::dynamic_adapter_name ("Concrete_Dynamic_Adapter");
ACE_Service_Config::static_svcs ()->insert (
&ace_svc_desc_TAO_Dynamic_Adapter_Impl
);
return 0;
}
ACE_STATIC_SVC_DEFINE (
TAO_Dynamic_Adapter_Impl,
ACE_TEXT ("Concrete_Dynamic_Adapter"),
ACE_SVC_OBJ_T,
&ACE_SVC_NAME (TAO_Dynamic_Adapter_Impl),
ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
0
)
ACE_FACTORY_DEFINE (TAO_DynamicInterface, TAO_Dynamic_Adapter_Impl)
|