本文整理汇总了C++中portableinterceptor::ServerRequestInfo_ptr::forward_reference方法的典型用法代码示例。如果您正苦于以下问题:C++ ServerRequestInfo_ptr::forward_reference方法的具体用法?C++ ServerRequestInfo_ptr::forward_reference怎么用?C++ ServerRequestInfo_ptr::forward_reference使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableinterceptor::ServerRequestInfo_ptr
的用法示例。
在下文中一共展示了ServerRequestInfo_ptr::forward_reference方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INTERNAL
void
ForwardTest_Request_Interceptor::send_other (
PortableInterceptor::ServerRequestInfo_ptr ri)
{
// This will throw an exception if a location forward has not
// occured. If an exception is thrown then something is wrong with
// the PortableInterceptor::ForwardRequest support.
CORBA::Object_var forward = ri->forward_reference ();
if (CORBA::is_nil (forward.in ()))
throw CORBA::INTERNAL ();
}
示例2: INTERNAL
void
Server_Request_Interceptor::send_other (
PortableInterceptor::ServerRequestInfo_ptr ri)
{
CORBA::Boolean response_expected =
ri->response_expected ();
if (!response_expected) // A one-way request.
return;
// If we get this far then we should have received a
// LOCATION_FORWARD reply.
// This will throw an exception if a location forward has not
// occured. If an exception is thrown then something is wrong with
// the PortableInterceptor::ForwardRequest support.
CORBA::Object_var forward = ri->forward_reference ();
if (CORBA::is_nil (forward.in ()))
throw CORBA::INTERNAL ();
}
示例3: INTERNAL
void
Echo_Server_Request_Interceptor::send_other (
PortableInterceptor::ServerRequestInfo_ptr ri)
{
CORBA::String_var operation = ri->operation ();
ACE_DEBUG ((LM_DEBUG,
"%C.send_other from \"%C\"\n",
this->myname_,
operation.in ()));
// Check that the request service context hasn't been changed.
IOP::ServiceContext_var sc =
ri->get_request_service_context (::service_id);
const char *buf = reinterpret_cast<const char *> (sc->context_data.get_buffer ());
if (ACE_OS::strcmp (buf, request_msg) != 0)
{
ACE_ERROR ((LM_ERROR,
"ERROR: Echo_Server_Request_Interceptor::send_reply: "
"Expected request service context to be: %C.\n"
" Got: %C\n",
request_msg,
buf));
}
// If we get this far then we should have received a
// LOCATION_FORWARD reply.
// This will throw an exception if a location forward has not
// occurred. If an exception is thrown then something is wrong with
// the PortableInterceptor::ForwardRequest support.
CORBA::Object_var forward = ri->forward_reference ();
if (CORBA::is_nil (forward.in ()))
throw CORBA::INTERNAL ();
}