Merge pull request #1815 from sonndinh/get_signal_info
[ACE_TAO.git] / TAO / interop-tests / CdrOutArg / tao / server_interceptor.cpp
blob1761e2b4f04e5a27130b42da469261c04b1f85b5
1 #include "server_interceptor.h"
2 #include "tao/OctetSeqC.h"
4 #include "ace/Log_Msg.h"
5 #include "ace/OS_NS_string.h"
7 const IOP::ServiceId service_id = 0xdeadbeef;
8 const char *request_msg = "12345678";
11 Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
12 : myname_ ("Echo_Server_Interceptor")
16 Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor (void)
20 char *
21 Echo_Server_Request_Interceptor::name (void)
23 return CORBA::string_dup (this->myname_);
26 void
27 Echo_Server_Request_Interceptor::destroy (void)
31 void
32 Echo_Server_Request_Interceptor::receive_request_service_contexts (
33 PortableInterceptor::ServerRequestInfo_ptr ri)
36 CORBA::String_var operation = ri->operation ();
38 ACE_DEBUG ((LM_DEBUG,
39 "%C.receive_request_service_contexts from "
40 "\"%C\"\n",
41 this->myname_,
42 operation.in ()));
44 IOP::ServiceId id = ::service_id;
45 IOP::ServiceContext_var sc =
46 ri->get_request_service_context (id);
48 const char *buf =
49 reinterpret_cast<const char *> (sc->context_data.get_buffer ());
50 #if 0
51 ACE_DEBUG ((LM_DEBUG,
52 " Received service context: %C\n",
53 buf));
54 #endif /*if 0*/
56 if (ACE_OS::strcmp (buf, request_msg) != 0)
58 ACE_ERROR ((LM_ERROR,
59 "ERROR: Echo_Server_Request_Interceptor::receive_request_service_contexts: "
60 "Expected request service context to be: %C\n",
61 request_msg));
67 void
68 Echo_Server_Request_Interceptor::receive_request (
69 PortableInterceptor::ServerRequestInfo_ptr)
71 // Do nothing
74 void
75 Echo_Server_Request_Interceptor::send_reply (
76 PortableInterceptor::ServerRequestInfo_ptr )
80 void
81 Echo_Server_Request_Interceptor::send_exception (
82 PortableInterceptor::ServerRequestInfo_ptr )
86 void
87 Echo_Server_Request_Interceptor::send_other (
88 PortableInterceptor::ServerRequestInfo_ptr)