server_iorinterceptor_orbinitializer.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 60 行
CPP
60 行
// Server_IORInterceptor_ORBInitializer.cpp,v 1.6 2003/10/29 04:05:44 bala Exp
#include "Server_IORInterceptor_ORBInitializer.h"
#include "Server_IORInterceptor.h"
#include "tao/ORB_Constants.h"
#include "GatewayC.h"
ACE_RCSID (ORT,
Server_IORInterceptor_ORBInitializer,
"$Id: ")
void
Server_IORInterceptor_ORBInitializer::pre_init (
PortableInterceptor::ORBInitInfo_ptr /* info */
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
Server_IORInterceptor_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::Object_var obj =
info->resolve_initial_references ("Gateway_Object_Factory"
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
/// Narrow it down correctly.
Gateway::Object_Factory_var gateway_object_factory =
Gateway::Object_Factory::_narrow (obj.in ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
/// Check for nil reference
if (CORBA::is_nil (gateway_object_factory.in ()))
ACE_ERROR ((LM_ERROR,
"Unable to obtain reference to Gateway::Object_Factory "
"object.\n"));
PortableInterceptor::IORInterceptor_ptr gateway;
ACE_NEW_THROW_EX (gateway,
Server_IORInterceptor (gateway_object_factory.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
ENOMEM),
CORBA::COMPLETED_NO));
ACE_CHECK;
PortableInterceptor::IORInterceptor_var ior_interceptor = gateway;
info->add_ior_interceptor (ior_interceptor.in ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?