blob: ac66f70dc63d0420e5bb82c530442270d0272c47 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
// -*- C++ -*-
//
// $Id$
//
#include "Client_ORBInitializer.h"
#include "interceptors.h"
#include "Interceptor_Type.h"
ACE_RCSID (Benchmark, Client_ORBInitializer, "$Id$")
Client_ORBInitializer::Client_ORBInitializer (int interceptor_type)
: interceptor_type_ (interceptor_type)
{
}
void
Client_ORBInitializer::pre_init (
PortableInterceptor::ORBInitInfo_ptr
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
Client_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
PortableInterceptor::ClientRequestInterceptor_ptr tmp =
PortableInterceptor::ClientRequestInterceptor::_nil ();
switch (this->interceptor_type_)
{
default:
case IT_NONE:
return;
case IT_NOOP:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Client_Request_NOOP_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
case IT_CONTEXT:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Client_Request_Context_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
case IT_DYNAMIC:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Client_Request_Dynamic_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
}
ACE_CHECK;
PortableInterceptor::ClientRequestInterceptor_var interceptor = tmp;
info->add_client_request_interceptor (interceptor.in ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
|