1 #include "Server_Request_Interceptor.h"
3 CORBA::Boolean receive_request_service_contexts_called
= 0;
4 CORBA::Boolean receive_request_called
= 0;
5 CORBA::Boolean ending_interception_point_called
= 0;
8 Server_Request_Interceptor::Server_Request_Interceptor ()
12 Server_Request_Interceptor::~Server_Request_Interceptor ()
17 Server_Request_Interceptor::name ()
19 return CORBA::string_dup (""); // Anonymous
23 Server_Request_Interceptor::destroy ()
28 Server_Request_Interceptor::receive_request_service_contexts (
29 PortableInterceptor::ServerRequestInfo_ptr ri
)
31 CORBA::String_var op
= ri
->operation ();
33 if (ACE_OS::strcmp (op
.in (), "shutdown") != 0)
35 if (::receive_request_service_contexts_called
!= 0)
37 throw CORBA::INTERNAL ();
40 ::receive_request_service_contexts_called
= 1;
45 Server_Request_Interceptor::receive_request (
46 PortableInterceptor::ServerRequestInfo_ptr ri
)
48 CORBA::String_var op
= ri
->operation ();
50 if (ACE_OS::strcmp (op
.in (), "shutdown") != 0)
52 if (::receive_request_called
!= 0)
54 throw CORBA::INTERNAL ();
57 ::receive_request_called
= 1;
62 Server_Request_Interceptor::send_reply (
63 PortableInterceptor::ServerRequestInfo_ptr ri
)
65 CORBA::String_var op
= ri
->operation ();
67 if (ACE_OS::strcmp (op
.in (), "shutdown") != 0)
69 if (::ending_interception_point_called
!= 0)
71 throw CORBA::INTERNAL ();
74 ::ending_interception_point_called
= 1;
79 Server_Request_Interceptor::send_exception (
80 PortableInterceptor::ServerRequestInfo_ptr ri
)
82 CORBA::String_var op
= ri
->operation ();
84 if (ACE_OS::strcmp (op
.in (), "shutdown") != 0)
86 if (::ending_interception_point_called
!= 0)
88 throw CORBA::INTERNAL ();
91 ::ending_interception_point_called
= 1;
96 Server_Request_Interceptor::send_other (
97 PortableInterceptor::ServerRequestInfo_ptr ri
)
99 CORBA::String_var op
= ri
->operation ();
101 if (ACE_OS::strcmp (op
.in (), "shutdown") != 0)
103 if (::ending_interception_point_called
!= 0)
105 throw CORBA::INTERNAL ();
108 ::ending_interception_point_called
= 1;