本文整理汇总了C++中portableinterceptor::ServerRequestInfo_ptr::set_slot方法的典型用法代码示例。如果您正苦于以下问题:C++ ServerRequestInfo_ptr::set_slot方法的具体用法?C++ ServerRequestInfo_ptr::set_slot怎么用?C++ ServerRequestInfo_ptr::set_slot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableinterceptor::ServerRequestInfo_ptr
的用法示例。
在下文中一共展示了ServerRequestInfo_ptr::set_slot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INTERNAL
void
Echo_Server_Request_Interceptor::receive_request_service_contexts (
PortableInterceptor::ServerRequestInfo_ptr ri)
{
CORBA::String_var operation = ri->operation ();
ACE_DEBUG ((LM_DEBUG,
"%C.receive_request_service_contexts from "
"\"%C\"\n",
this->myname_,
operation.in ()));
// Ignore the shutdown operation.
if (ACE_OS_String::strcmp ("shutdown", operation.in ()) == 0)
return;
// retrieve the context
IOP::ServiceId id = ::service_id;
IOP::ServiceContext_var sc =
ri->get_request_service_context (id);
const char *buf =
reinterpret_cast<const char *> (sc->context_data.get_buffer ());
ACE_DEBUG ((LM_DEBUG,
" Received service context: %C\n",
buf));
if (ACE_OS::strcmp (buf, request_msg) != 0)
{
ACE_ERROR ((LM_ERROR,
"ERROR: Echo_Server_Request_Interceptor::receive_request_service_contexts: "
"Expected request service context to be: %C\n",
request_msg ));
}
else
{
// put the context into s slot
CORBA::Any data;
data <<= buf;
try
{
ri->set_slot (slotId, data);
ACE_DEBUG ((LM_DEBUG, "receive_request_service_contexts filled Slot %d\n",(int)slotId));
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception (
"Exception thrown in receive_request_service_contexts()\n");
throw CORBA::INTERNAL ();
}
}
}