本文整理汇总了C++中portableinterceptor::ORBInitInfo_ptr类的典型用法代码示例。如果您正苦于以下问题:C++ ORBInitInfo_ptr类的具体用法?C++ ORBInitInfo_ptr怎么用?C++ ORBInitInfo_ptr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ORBInitInfo_ptr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
void
ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
ACE_NEW_THROW_EX (this->interceptor_,
ServerRequestInterceptor,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var sr_interceptor =
this->interceptor_;
info->add_server_request_interceptor (sr_interceptor.in ());
PortableInterceptor::ServerRequestInterceptor_ptr reject_interceptor;
ACE_NEW_THROW_EX (reject_interceptor,
TAO_LB_ServerRequestInterceptor (this->load_alert_),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var safe_reject_interceptor =
reject_interceptor;
info->add_server_request_interceptor (safe_reject_interceptor.in ());
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:32,代码来源:ORBInitializer.cpp
示例2: orb
void
ORB_Initializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
{
// Allocate slot id.
//
state_slot_id (info->allocate_slot_id ());
// Register replica controller as server request interceptor.
//
TAO_ORBInitInfo* tao_info = dynamic_cast<TAO_ORBInitInfo*> (info);
CORBA::ORB_var orb (tao_info->orb_core ()->orb ());
PortableInterceptor::ServerRequestInterceptor_var interceptor;
{
PortableInterceptor::ServerRequestInterceptor *tmp_interceptor = 0;
ACE_NEW_THROW_EX (tmp_interceptor,
ReplicaController (orb.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
interceptor = tmp_interceptor;
}
info->add_server_request_interceptor (interceptor.in ());
}
开发者ID:CCJY,项目名称:ATCD,代码行数:32,代码来源:ORB_Initializer.cpp
示例3: ClientInterceptor
void
ClientInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info
)
{
// get Codec factory
IOP::CodecFactory_var codec_factory = info->codec_factory();
// Create and register the request interceptors.
PortableInterceptor::ClientRequestInterceptor_ptr ci =
PortableInterceptor::ClientRequestInterceptor::_nil ();
try
{
ci = new ClientInterceptor (codec_factory);
}
catch(...)
{
std::cerr << "Exception occurred trying to create ClientInterceptor." << std::endl;
}
PortableInterceptor::ClientRequestInterceptor_var ci_interceptor =
ci;
info->add_client_request_interceptor (ci_interceptor.in ());
}
开发者ID:INMarkus,项目名称:ATCD,代码行数:27,代码来源:ClientInitializer.cpp
示例4:
void
FOO_IORInterceptor_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
IOP::CodecFactory_var codec_factory =
info->codec_factory ();
// Set up a structure that contains information necessary to
// create a GIOP 1.2 CDR encapsulation Codec.
IOP::Encoding encoding;
encoding.format = IOP::ENCODING_CDR_ENCAPS;
encoding.major_version = 1;
encoding.minor_version = 2;
// Obtain the CDR encapsulation Codec.
IOP::Codec_var codec =
codec_factory->create_codec (encoding);
PortableInterceptor::IORInterceptor_ptr foo;
ACE_NEW_THROW_EX (foo,
FOO_IORInterceptor (codec.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::IORInterceptor_var ior_interceptor =
foo;
info->add_ior_interceptor (ior_interceptor.in ());
}
开发者ID:manut,项目名称:TAO,代码行数:32,代码来源:FOO_IORInterceptor_ORBInitializer.cpp
示例5:
void
Client_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
CORBA::String_var orb_id = info->orb_id ();
CORBA::StringSeq_var args = info->arguments ();
CORBA::String_var forward_str;
// Extract the last forward reference from the argument list.
CORBA::ULong args_len = args->length ();
for (CORBA::ULong i = 0; i < args_len; ++i)
if (ACE_OS::strcmp ("-k", args[i]) == 0
&& i < (args_len - 1))
forward_str = args[i + 1];
PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
PortableInterceptor::ClientRequestInterceptor::_nil ();
// Install the client request interceptor.
ACE_NEW_THROW_EX (interceptor,
Client_Request_Interceptor (orb_id.in (),
forward_str.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ClientRequestInterceptor_var
client_interceptor = interceptor;
info->add_client_request_interceptor (client_interceptor.in ());
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:35,代码来源:Client_ORBInitializer.cpp
示例6: ClientInterceptor
void
ClientInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
{
// get Codec factory
IOP::CodecFactory_var codec_factory = info->codec_factory();
// Create and register the request interceptors.
PortableInterceptor::ClientRequestInterceptor_var ci =
new ClientInterceptor (codec_factory);
info->add_client_request_interceptor (ci.in());
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:11,代码来源:ClientInitializer.cpp
示例7: INTERNAL
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO::SSLIOP::Server_Invocation_Interceptor::Server_Invocation_Interceptor
(
PortableInterceptor::ORBInitInfo_ptr info,
::Security::QOP default_qop,
size_t tss_slot
)
: qop_ (default_qop)
{
/*
* Cache references to the "Current" objects that we'll need during
* during invocations.
*/
CORBA::Object_var obj =
info->resolve_initial_references ("SSLIOPCurrent");
this->ssliop_current_ = ::SSLIOP::Current::_narrow (obj.in ());
if (!CORBA::is_nil (this->ssliop_current_.in ()))
{
TAO::SSLIOP::Current *tao_current =
dynamic_cast<TAO::SSLIOP::Current *> (this->ssliop_current_.in ());
if (tao_current != 0)
{
if (TAO_debug_level > 3)
ORBSVCS_DEBUG ((LM_DEBUG, "TAO (%P|%t) SSLIOP_Invocation_Interceptor::CTOR--setting up SSLIOP Current with slot %d\n", tss_slot));
tao_current->tss_slot (tss_slot);
}
else
throw CORBA::INTERNAL ();
}
obj = info->resolve_initial_references ("SecurityLevel2:SecurityManager");
this->sec2manager_ = SecurityLevel2::SecurityManager::_narrow (obj.in ());
if (! CORBA::is_nil (this->sec2manager_.in ()))
{
// set the slot id? things seem to work without doing this
}
#if 0
// Don't need this now that we're not using access_allowed(), but
// I'm leaving the code here just in case it would become convenient
// for some other use.
obj = info->resolve_initial_references ("POACurrent");
this->poa_current_ = PortableServer::Current::_narrow (obj.in ());
#endif
}
开发者ID:binary42,项目名称:OCI,代码行数:51,代码来源:SSLIOP_Invocation_Interceptor.cpp
示例8: ServerRequestInterceptor
void
ServerORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
CORBA::Object_var obj =
info->resolve_initial_references ("POACurrent");
PortableServer::Current_var poa_current =
PortableServer::Current::_narrow (obj.in ());
ACE_ASSERT (!CORBA::is_nil (poa_current.in ()));
CORBA::String_var orb_id = info->orb_id ();
// Create and register the test's ServerRequestInterceptor
PortableInterceptor::ServerRequestInterceptor_ptr tmp;
ACE_NEW_THROW_EX (tmp,
ServerRequestInterceptor (orb_id.in (),
poa_current.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var server_interceptor = tmp;
info->add_server_request_interceptor (server_interceptor.in ());
// Create and register the test's IORInterceptor
PortableInterceptor::IORInterceptor_ptr ort_test_interceptor;
ACE_NEW_THROW_EX (ort_test_interceptor,
ORT_test_IORInterceptor,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::IORInterceptor_var ior_interceptor =
ort_test_interceptor;
info->add_ior_interceptor (ior_interceptor.in ());
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:49,代码来源:ServerORBInitializer.cpp
示例9: INV_OBJREF
void
TAO::SSLIOP::ORBInitializer::pre_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info);
if (CORBA::is_nil (tao_info.in ()))
throw CORBA::INV_OBJREF ();
// SSLIOP doesn't use the ORB Core until a request invocation occurs
// so there is no problem in retrieving the ORB Core pointer in this
// pre_init() method.
TAO_ORB_Core *orb_core = tao_info->orb_core ();
// Create the SSLIOP::Current object.
// Note that a new SSLIOP::Current object is created for each ORB.
// It wouldn't be very useful to share security context information
// with another ORB that isn't configured with security, for
// example.
SSLIOP::Current_ptr current;
ACE_NEW_THROW_EX (current,
TAO::SSLIOP::Current (orb_core),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
SSLIOP::Current_var ssliop_current = current;
// Register the SSLIOP::Current object reference with the ORB.
info->register_initial_reference ("SSLIOPCurrent", ssliop_current.in ());
}
开发者ID:asdlei00,项目名称:ACE,代码行数:33,代码来源:SSLIOP_ORBInitializer.cpp
示例10: ServerInterceptor
void
ServerInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
// get reference to the codec_factory
IOP::CodecFactory_var codec_factory = info->codec_factory();
// Create and register the request interceptors.
PortableInterceptor::ServerRequestInterceptor_var si =
new ServerInterceptor (codec_factory);
info->add_server_request_interceptor (si.in());
// add IOR Interceptor
PortableInterceptor::IORInterceptor_var iori = new ServerIORInterceptor;
info->add_ior_interceptor (iori.in());
}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:16,代码来源:ServerInitializer.cpp
示例11: INTERNAL
size_t
TAO::SSLIOP::ORBInitializer::get_tss_slot_id (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Obtain the Security Service TSS slot ID from the SecurityCurrent
// object.
CORBA::Object_var obj =
info->resolve_initial_references ("SecurityLevel3:SecurityCurrent");
SecurityLevel3::SecurityCurrent_var current =
SecurityLevel3::SecurityCurrent::_narrow (obj.in ());
TAO::SL3::SecurityCurrent * security_current =
dynamic_cast<TAO::SL3::SecurityCurrent *> (current.in ());
if (security_current == 0)
{
ORBSVCS_DEBUG ((LM_DEBUG,
"Unable to obtain TSS slot ID from "
"\"SecurityCurrent\" object.\n"));
throw CORBA::INTERNAL ();
}
return security_current->tss_slot ();
}
开发者ID:asdlei00,项目名称:ACE,代码行数:26,代码来源:SSLIOP_ORBInitializer.cpp
示例12:
void
TAO_RTScheduler_ORB_Initializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
{
// @@ This is busted. TAO_ORBInitInfo should do proper reference
// counting.
// Narrow to a TAO_ORBInitInfo object to get access to the
// orb_core() TAO extension.
//TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info
// );
if (TAO_debug_level > 0)
TAOLIB_DEBUG ((LM_DEBUG,
"In post_init\n"));
CORBA::Object_var rt_current_obj =
info->resolve_initial_references (TAO_OBJID_RTCURRENT);
RTCORBA::Current_var rt_current =
RTCORBA::Current::_narrow (rt_current_obj.in ());
if (CORBA::is_nil (rt_current.in ()))
{
TAOLIB_DEBUG ((LM_DEBUG,
"(%P|%t) ::post_init\n"
"(%P|%t) Unable to narrow to RTCORBA::Current\n"));
throw ::CORBA::INTERNAL ();
}
this->current_->rt_current (rt_current.in ());
}
开发者ID:asdlei00,项目名称:ACE,代码行数:31,代码来源:RTScheduler_Initializer.cpp
示例13: current
void
Current_ORBInitializer_Base::pre_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Narrow to a TAO_ORBInitInfo object to get access to the
// allocate_tss_slot_id() TAO extension.
TAO_ORBInitInfo_var tao_info =
TAO_ORBInitInfo::_narrow (info);
if (CORBA::is_nil (tao_info.in ()))
{
if (TAO_debug_level > 0)
TAOLIB_ERROR ((LM_ERROR,
"TAO (%P|%t) TAO::Transport::ORBInitializer::pre_init - "
"Panic: unable to narrow the ORBInitInfo_ptr\n"));
throw ::CORBA::INTERNAL ();
}
// Reserve a TSS slot in the ORB core internal TSS resources for the
// thread-specific portion of the Current object.
size_t tss_slot = tao_info->allocate_tss_slot_id (0);
// Create the Current
Current_var current (this->make_current_instance (tao_info->orb_core (),
tss_slot));
info->register_initial_reference (ACE_TEXT_ALWAYS_CHAR (this->id_.fast_rep ()),
current.in ());
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:30,代码来源:Current_ORBInitializer_Base.cpp
示例14:
void
TAO_FT_ServerORBInitializer::register_policy_factories (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Register the FTCORBA policy factories.
PortableInterceptor::PolicyFactory_ptr temp_factory =
PortableInterceptor::PolicyFactory::_nil ();
PortableInterceptor::PolicyFactory_var policy_factory;
// This policy factory is used for all FTCORBA related policies.
ACE_NEW_THROW_EX (temp_factory,
TAO_FT_ServerPolicyFactory,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
policy_factory = temp_factory;
// Bind the same policy factory to all FTCORBA related policy
// types since a single policy factory is used to create each of
// the different types of FTCORBA policies.
CORBA::PolicyType type = FT::HEARTBEAT_ENABLED_POLICY;
info->register_policy_factory (type,
policy_factory.in ());
}
开发者ID:asdlei00,项目名称:ACE,代码行数:31,代码来源:FT_ServerORBInitializer.cpp
示例15: ClientInterceptor
void
ClientInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
{
// Find the Naming Service
CORBA::Object_var naming_obj =
info->resolve_initial_references("NameService");
CosNaming::NamingContext_var root =
CosNaming::NamingContext::_narrow(naming_obj.in());
if( CORBA::is_nil(root.in())) {
std::cerr << "Nil Naming Context reference" << std::endl;
ACE_ASSERT(false);
}
// Resolve the Messenger object
CosNaming::Name name;
name.length( 1 );
name[0].id = CORBA::string_dup( "Messenger" );
CORBA::Object_var obj = CORBA::Object::_nil();
while ( CORBA::is_nil( obj.in() ) ) {
try {
obj = root->resolve( name );
} catch (const CosNaming::NamingContext::NotFound&) {
// Sleep for a second and try again
ACE_OS::sleep(1);
}
}
Messenger_var messenger = Messenger::_narrow( obj.in() );
if( CORBA::is_nil( messenger.in() ) ) {
std::cerr << "Not a Messenger reference" << std::endl;
ACE_ASSERT(false);
}
// allocate slot
slot_ = info->allocate_slot_id();
// get PICurrent
CORBA::Object_var current_obj = info->resolve_initial_references("PICurrent");
current_ =
PortableInterceptor::Current::_narrow(current_obj.in());
// Create and register the request interceptors.
PortableInterceptor::ClientRequestInterceptor_var ci =
new ClientInterceptor(messenger, current_.in(), slot_);
info->add_client_request_interceptor (ci.in());
}
开发者ID:asdlei00,项目名称:ACE,代码行数:47,代码来源:ClientInitializer.cpp
示例16: sizeof
void
TAO_RT_ORBInitializer::register_policy_factories (
PortableInterceptor::ORBInitInfo_ptr info)
{
// The RTCorba policy factory is stateless and reentrant, so share a
// single instance between all ORBs.
if (CORBA::is_nil (this->policy_factory_.in ()))
{
PortableInterceptor::PolicyFactory_ptr policy_factory;
ACE_NEW_THROW_EX (policy_factory,
TAO_RT_PolicyFactory,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
this->policy_factory_ = policy_factory;
}
// Bind the same policy factory to all RTCORBA related policy
// types since a single policy factory is used to create each of
// the different types of RTCORBA policies.
static CORBA::PolicyType const type[] = {
RTCORBA::PRIORITY_MODEL_POLICY_TYPE,
RTCORBA::THREADPOOL_POLICY_TYPE,
RTCORBA::SERVER_PROTOCOL_POLICY_TYPE,
RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE,
RTCORBA::PRIVATE_CONNECTION_POLICY_TYPE,
RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE
};
const CORBA::PolicyType *end =
type + sizeof (type) / sizeof (type[0]);
for (CORBA::PolicyType const * i = type;
i != end;
++i)
{
try
{
info->register_policy_factory (*i, this->policy_factory_.in ());
}
catch (const ::CORBA::BAD_INV_ORDER& ex)
{
if (ex.minor () == (CORBA::OMGVMCID | 16))
{
// The factory is already there, it happens because the
// magic initializer in PortableServer.cpp registers
// with the ORB multiple times. This is an indication
// that we should do no more work in this
// ORBInitializer.
return;
}
throw;
}
}
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:58,代码来源:RT_ORBInitializer.cpp
示例17:
void
Server_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Create and register the test request interceptors.
PortableInterceptor::ServerRequestInterceptor_ptr si =
PortableInterceptor::ServerRequestInterceptor::_nil ();
ACE_NEW_THROW_EX (si,
Server_Request_Interceptor ("SERVER A"),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var si_interceptor =
si;
info->add_server_request_interceptor (si_interceptor.in ());
ACE_NEW_THROW_EX (si,
Server_Request_Interceptor ("SERVER B"),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
si_interceptor = si;
info->add_server_request_interceptor (si_interceptor.in ());
ACE_NEW_THROW_EX (si,
Server_Request_Interceptor ("SERVER C"),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
si_interceptor = si;
info->add_server_request_interceptor (si_interceptor.in ());
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:45,代码来源:Server_ORBInitializer.cpp
示例18:
void
Client_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Create and register the test request interceptors.
PortableInterceptor::ClientRequestInterceptor_ptr ci =
PortableInterceptor::ClientRequestInterceptor::_nil ();
ACE_NEW_THROW_EX (ci,
Client_Request_Interceptor ("CLIENT A"),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ClientRequestInterceptor_var ci_interceptor =
ci;
info->add_client_request_interceptor (ci_interceptor.in ());
ACE_NEW_THROW_EX (ci,
Client_Request_Interceptor ("CLIENT B"),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
ci_interceptor = ci;
info->add_client_request_interceptor (ci_interceptor.in ());
ACE_NEW_THROW_EX (ci,
Client_Request_Interceptor ("CLIENT C"),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
ci_interceptor = ci;
info->add_client_request_interceptor (ci_interceptor.in ());
}
开发者ID:manut,项目名称:TAO,代码行数:45,代码来源:Client_ORBInitializer.cpp
示例19: if
void
Collocated_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
CORBA::String_var orb_id =
info->orb_id ();
if (!ACE_OS::strcmp (orb_id.in (), "client_orb"))
{
PortableInterceptor::ClientRequestInterceptor_ptr interceptor =
PortableInterceptor::ClientRequestInterceptor::_nil ();
// Install the Echo client request interceptor
ACE_NEW_THROW_EX (interceptor,
Echo_Client_Request_Interceptor (orb_id.in ()),
CORBA::NO_MEMORY ());
PortableInterceptor::ClientRequestInterceptor_var
client_interceptor = interceptor;
info->add_client_request_interceptor (client_interceptor.in ());
}
else if (!ACE_OS::strcmp (orb_id.in (), "server_orb"))
{
PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
PortableInterceptor::ServerRequestInterceptor::_nil ();
// Install the Echo server request interceptor
ACE_NEW_THROW_EX (interceptor,
Echo_Server_Request_Interceptor,
CORBA::NO_MEMORY ());
PortableInterceptor::ServerRequestInterceptor_var
server_interceptor = interceptor;
info->add_server_request_interceptor (server_interceptor.in ());
}
else
{
//Throw exception?
}
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:45,代码来源:Collocated_ORBInitializer.cpp
示例20:
void
TAO_LB_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
CORBA::Object_var obj =
info->resolve_initial_references ("LoadManager");
CosLoadBalancing::LoadManager_var lm =
CosLoadBalancing::LoadManager::_narrow (obj.in ());
CORBA::String_var orbid = info->orb_id ();
PortableInterceptor::IORInterceptor_ptr tmp;
ACE_NEW_THROW_EX (tmp,
TAO_LB_IORInterceptor (this->object_groups_,
this->repository_ids_,
this->location_.in (),
lm.in (),
orbid.in (),
this->load_alert_),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::IORInterceptor_var ior_interceptor = tmp;
info->add_ior_interceptor (ior_interceptor.in ());
// ----------------
PortableInterceptor::ServerRequestInterceptor_ptr sri;
ACE_NEW_THROW_EX (sri,
TAO_LB_ServerRequestInterceptor (this->load_alert_),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var sr_interceptor = sri;
info->add_server_request_interceptor (sr_interceptor.in ());
}
开发者ID:CCJY,项目名称:ATCD,代码行数:45,代码来源:LB_ORBInitializer.cpp
注:本文中的portableinterceptor::ORBInitInfo_ptr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论