2 * @file Server_Interceptor.cpp
4 * @author Carlos O'Ryan <coryan@atdesk.com>
7 #include "Server_Interceptor.h"
8 #include "Shared_Interceptor.h"
9 #include "tao/OctetSeqC.h"
10 #include "ace/OS_NS_string.h"
12 Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor ()
17 Echo_Server_Request_Interceptor::name ()
19 return CORBA::string_dup ("Echo_Server_Interceptor");
23 Echo_Server_Request_Interceptor::destroy ()
28 Echo_Server_Request_Interceptor::receive_request_service_contexts (
29 PortableInterceptor::ServerRequestInfo_ptr ri
)
31 CORBA::String_var operation
=
34 if (ACE_OS::strcmp ("_is_a", operation
.in ()) == 0)
37 IOP::ServiceId id
= ::service_id
;
38 IOP::ServiceContext_var sc
=
39 ri
->get_request_service_context (id
);
41 if (sc
->context_data
.length() != magic_cookie_len
43 magic_cookie
, sc
->context_data
.get_buffer(),
44 magic_cookie_len
) != 0)
46 throw CORBA::BAD_PARAM();
52 Echo_Server_Request_Interceptor::receive_request (
53 PortableInterceptor::ServerRequestInfo_ptr
)
58 Echo_Server_Request_Interceptor::send_reply (
59 PortableInterceptor::ServerRequestInfo_ptr
)
64 Echo_Server_Request_Interceptor::send_exception (
65 PortableInterceptor::ServerRequestInfo_ptr
)
70 Echo_Server_Request_Interceptor::send_other (
71 PortableInterceptor::ServerRequestInfo_ptr
)