当前位置: 首页>>代码示例>>C++>>正文


C++ ServerRequestInfo_ptr::forward_reference方法代码示例

本文整理汇总了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 ();
}
开发者ID:asdlei00,项目名称:ACE,代码行数:13,代码来源:server_interceptor.cpp

示例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 ();
}
开发者ID:manut,项目名称:TAO,代码行数:21,代码来源:Server_Request_Interceptor.cpp

示例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 ();
}
开发者ID:milan-mpathix,项目名称:ATCD,代码行数:38,代码来源:server_interceptor.cpp


注:本文中的portableinterceptor::ServerRequestInfo_ptr::forward_reference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。