本文整理汇总了C++中portableinterceptor::ORBInitInfo_ptr::add_server_request_interceptor方法的典型用法代码示例。如果您正苦于以下问题:C++ ORBInitInfo_ptr::add_server_request_interceptor方法的具体用法?C++ ORBInitInfo_ptr::add_server_request_interceptor怎么用?C++ ORBInitInfo_ptr::add_server_request_interceptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableinterceptor::ORBInitInfo_ptr
的用法示例。
在下文中一共展示了ORBInitInfo_ptr::add_server_request_interceptor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ());
}
示例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 ());
}
示例3:
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 ());
}
示例4:
void
Server_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Install the Echo server request interceptor
ACE_NEW_THROW_EX (this->server_interceptor_,
ForwardTest_Request_Interceptor,
CORBA::NO_MEMORY ());
PortableInterceptor::ServerRequestInterceptor_var interceptor =
this->server_interceptor_;
info->add_server_request_interceptor (interceptor.in ());
}
示例5: 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 ());
}
示例6: 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());
}
示例7:
void
Server_ORBInitializer2::register_server_request_interceptors (
PortableInterceptor::ORBInitInfo_ptr info
)
{
TAO249_ServerRequest_Interceptor2 *sri = 0;
ACE_NEW_THROW_EX (sri,
TAO249_ServerRequest_Interceptor2,
CORBA::NO_MEMORY ());
PortableInterceptor::ServerRequestInterceptor_var
server_interceptor = sri;
this->sri_ = sri;
info->add_server_request_interceptor (server_interceptor.in ());
}
示例8:
void
Server_ORBInitializer2::register_server_request_interceptors (
PortableInterceptor::ORBInitInfo_ptr info)
{
PortableInterceptor::ServerRequestInterceptor_ptr sri =
PortableInterceptor::ServerRequestInterceptor::_nil ();
ACE_NEW_THROW_EX (sri,
ServerRequest_Interceptor2,
CORBA::NO_MEMORY ());
PortableInterceptor::ServerRequestInterceptor_var
server_interceptor = sri;
info->add_server_request_interceptor (server_interceptor.in ());
}
示例9:
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 ());
}
示例10: 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?
}
}
示例11:
void
Server_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
PortableInterceptor::ServerRequestInterceptor_ptr interceptor;
// Install the server request interceptor.
ACE_NEW_THROW_EX (interceptor,
Server_Request_Interceptor,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
this->server_interceptor_ = interceptor;
info->add_server_request_interceptor (interceptor);
}
示例12: switch
void
Server_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
PortableInterceptor::ServerRequestInterceptor_ptr tmp =
PortableInterceptor::ServerRequestInterceptor::_nil ();
switch (this->interceptor_type_)
{
default:
case IT_NONE:
return;
case IT_NOOP:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Server_Request_NOOP_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
case IT_CONTEXT:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Server_Request_Context_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
case IT_DYNAMIC:
{
// Installing the Vault interceptor
ACE_NEW_THROW_EX (tmp,
Vault_Server_Request_Dynamic_Interceptor (),
CORBA::NO_MEMORY ());
break;
}
}
PortableInterceptor::ServerRequestInterceptor_var interceptor = tmp;
info->add_server_request_interceptor (interceptor.in ());
}
示例13:
void
Server_ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
if (this->intr_ != 0)
{
return;
}
PortableInterceptor::ServerRequestInterceptor_ptr interceptor =
PortableInterceptor::ServerRequestInterceptor::_nil ();
// Install the Echo server request interceptor
ACE_NEW_THROW_EX (this->intr_,
Ping_Death_Request_Interceptor (this->counter_),
CORBA::NO_MEMORY ());
PortableInterceptor::ServerRequestInterceptor_var
server_interceptor = interceptor;
info->add_server_request_interceptor (this->intr_); //server_interceptor.in ());
}
示例14:
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
void
TAO_RTScheduler_ORB_Initializer::pre_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
//
// Register all of the RT related services.
//
// Create the RT_Current.
// Narrow to a TAO_ORBInitInfo object to get access to the
// orb_core() TAO extension.
if (TAO_debug_level > 0)
TAOLIB_DEBUG ((LM_DEBUG,
"In pre_init\n"));
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,
"(%P|%t) Security_ORBInitializer::pre_init:\n"
"(%P|%t) Unable to narrow "
"\"PortableInterceptor::ORBInitInfo_ptr\" to\n"
"(%P|%t) \"TAO_ORBInitInfo *.\"\n"));
throw ::CORBA::INTERNAL ();
}
TAO_RTScheduler_Current *tmp_current = 0;
ACE_NEW_THROW_EX (tmp_current,
TAO_RTScheduler_Current,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
this->current_ = tmp_current;
this->current_->init (tao_info->orb_core ());
CORBA::Object_var current_obj =
RTScheduling::Current::_narrow (this->current_.in ());
info->register_initial_reference ("RTScheduler_Current", current_obj.in ());
Client_Interceptor *client_interceptor = 0;
ACE_NEW_THROW_EX (client_interceptor,
Client_Interceptor,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ClientRequestInterceptor_var safe_client =
client_interceptor;
info->add_client_request_interceptor (client_interceptor);
Server_Interceptor *server_interceptor = 0;
ACE_NEW_THROW_EX (server_interceptor,
Server_Interceptor (this->current_.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var safe_server =
server_interceptor;
info->add_server_request_interceptor (server_interceptor);
// Set the RTScheduler_Manager
TAO_RTScheduler_Manager *manager = 0;
ACE_NEW_THROW_EX (manager,
TAO_RTScheduler_Manager (tao_info->orb_core ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
TAO_RTScheduler_Manager_var safe_manager = manager;
info->register_initial_reference ("RTSchedulerManager", manager);
}
示例15:
void
TAO::SSLIOP::ORBInitializer::post_init (
PortableInterceptor::ORBInitInfo_ptr info)
{
// Note we do not store the SSLIOP::Current as a class member since
// we need to avoid potential problems where the same
// SSLIOP::Current object is shared between ORBs. Each ORB should
// have its own unique SSLIOP::Current object. By obtaining the
// SSLIOP::Current object from the resolve_initial_references()
// mechanism, we are guaranteed that the SSLIOP::Current object is
// specific to the ORB being initialized since a new SSLIOP::Current
// object is registered for each ORB in this ORBInitializer's
// pre_init() method.
// Create the SSLIOP secure invocation server request interceptor.
PortableInterceptor::ServerRequestInterceptor_ptr si =
PortableInterceptor::ServerRequestInterceptor::_nil ();
ACE_NEW_THROW_EX (si,
TAO::SSLIOP::Server_Invocation_Interceptor(
info,
this->qop_,
this->get_tss_slot_id (info)),
CORBA::NO_MEMORY (CORBA::SystemException::_tao_minor_code (TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
PortableInterceptor::ServerRequestInterceptor_var si_interceptor =
si;
// Register the SSLIOP secure invocation server request interceptor
// with the ORB.
info->add_server_request_interceptor (si_interceptor.in ());
// TAO_ORBInitInfo_var tao_info =
// TAO_ORBInitInfo::_narrow (info
//);
// if (CORBA::is_nil (tao_info.in ()))
// ACE_THROW (CORBA::INV_OBJREF ());
// TAO_ORB_Core * orb_core = tao_info->orb_core ();
// // Create the SSLIOP IOR interceptor.
// PortableInterceptor::IORInterceptor_ptr ii =
// PortableInterceptor::IORInterceptor::_nil ();
// ACE_NEW_THROW_EX (ii,
// TAO::SSLIOP::IORInterceptor (orb_core,
// this->csiv2_target_supports_,
// this->csiv2_target_requires_),
// CORBA::NO_MEMORY (
// CORBA::SystemException::_tao_minor_code (
// TAO::VMCID,
// ENOMEM),
// CORBA::COMPLETED_NO));
// PortableInterceptor::IORInterceptor_var ior_interceptor =
// ii;
// // Register the SSLIOP IORInterceptor.
// info->add_ior_interceptor (ior_interceptor.in ()
//);
// Register the SSLIOP-specific vault with the
// PrincipalAuthenticator.
CORBA::Object_var obj =
info->resolve_initial_references ("SecurityLevel3:SecurityManager");
SecurityLevel3::SecurityManager_var manager =
SecurityLevel3::SecurityManager::_narrow (obj.in ());
SecurityLevel3::CredentialsCurator_var curator =
manager->credentials_curator ();
TAO::SL3::CredentialsCurator_var tao_curator =
TAO::SL3::CredentialsCurator::_narrow (curator.in ());
TAO::SSLIOP::CredentialsAcquirerFactory * factory;
ACE_NEW_THROW_EX (factory,
TAO::SSLIOP::CredentialsAcquirerFactory,
CORBA::NO_MEMORY ());
auto_ptr<TAO::SSLIOP::CredentialsAcquirerFactory> safe_factory;
tao_curator->register_acquirer_factory ("SL3TLS", factory);
(void) safe_factory.release (); // CredentialsCurator now owns
// CredentialsAcquirerFactory.
}