blob: 4d6112bc7ef1b46c9d8d9d2ea8080f34f00052f3 (
plain)
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
|
// -*- C++ -*-
#include "Server_ORBInitializer.h"
#include "Interceptor_Type.h"
#include "server_interceptors.h"
Server_ORBInitializer::Server_ORBInitializer (int interceptor_type)
: interceptor_type_ (interceptor_type)
{
}
void
Server_ORBInitializer::pre_init (
PortableInterceptor::ORBInitInfo_ptr)
{
}
void
Server_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
PortableInterceptor::ServerRequestInterceptor_ptr tmp =
PortableInterceptor::ServerRequestInterceptor::_nil ();
switch (this->interceptor_type_)
{
default:
case IT_NONE:
return;
case IT_NOOP:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Server_Request_NOOP_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
case IT_CONTEXT:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Server_Request_Context_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
case IT_DYNAMIC:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Server_Request_Dynamic_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
}
PortableInterceptor::ServerRequestInterceptor_var interceptor = tmp;
info->add_server_request_interceptor (interceptor.in ());
}
|