本文整理汇总了C++中portableserver::POA_var::servant_to_id方法的典型用法代码示例。如果您正苦于以下问题:C++ POA_var::servant_to_id方法的具体用法?C++ POA_var::servant_to_id怎么用?C++ POA_var::servant_to_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableserver::POA_var
的用法示例。
在下文中一共展示了POA_var::servant_to_id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
int
TAO_EC_Gateway_IIOP::shutdown (void)
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, -1);
ec_control_->shutdown();
this->close_i ();
if (this->supplier_is_active_)
{
PortableServer::POA_var poa =
this->supplier_._default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (&this->supplier_);
poa->deactivate_object (id.in ());
this->supplier_is_active_ = false;
}
if (this->consumer_is_active_)
{
PortableServer::POA_var poa =
this->consumer_._default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (&this->consumer_);
poa->deactivate_object (id.in ());
this->consumer_is_active_ = false;
}
this->cleanup_consumer_ec_i ();
this->cleanup_supplier_ec_i ();
return 0;
}
示例2: catch
TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE>::~TAO_Trader (void)
{
// Remove Trading Components from POA
for (int i = LOOKUP_IF; i <= LINK_IF; i++)
{
if (this->ifs_[i] != 0)
{
try
{
PortableServer::POA_var poa =
this->ifs_[i]->_default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (this->ifs_[i]);
poa->deactivate_object (id.in ());
}
catch (const CORBA::Exception&)
{
// Don't let exceptions propagate out of this call since
// it's the destructor!
}
}
}
}
示例3: catch
// Shutdown.
void
AccountManager_i::close (Bank::Account_ptr account)
{
try
{
CORBA::String_var name = account->name ();
ACE_DEBUG((LM_DEBUG,
ACE_TEXT ("[SERVER] Process/Thread Id : (%P/%t) Closing Account for %C\n"),
name.in ()));
Account_i_var account;
if (hash_map_.unbind (name.in (), account) == -1)
{
if (TAO_debug_level > 0)
ACE_DEBUG((LM_DEBUG,
ACE_TEXT ("Unable to close account\n")));
}
if (!account.is_nil ())
{
PortableServer::POA_var poa = account->_default_POA ();
PortableServer::ObjectId_var id = poa->servant_to_id (account.in ());
poa->deactivate_object (id.in ());
}
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Unable to close Account\n");
}
}
示例4:
void
Session_Control::session_finished (CORBA::Boolean success)
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
if (this->session_count_ == 0)
{
ACE_ERROR ((LM_ERROR,
"ERROR: (%P|%t) Session_Control::session_finished, "
"unexpected callback\n"));
}
if (success == 0)
this->success_ = 0;
this->session_count_--;
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Session_Control::session_finished, "
"%d sessions to go\n",
this->session_count_));
if (session_count_ == 0)
{
PortableServer::POA_var poa =
this->_default_POA ();
PortableServer::ObjectId_var oid =
poa->servant_to_id (this);
poa->deactivate_object (oid.in ());
}
}
示例5:
AccessCorbaDef_Impl::~AccessCorbaDef_Impl()
{
//deactivateServant();
try
{
// Get the default POA
PortableServer::POA_var poa = this->_default_POA();
// Get the object ID
PortableServer::ObjectId_var id = poa->servant_to_id(this);
// Deactivate the object
poa->deactivate_object( id.in() );
/////////////////////////////
m_orbVar->shutdown( CORBA::Boolean(true) );
// Clean up the orb entirely
m_orbVar->destroy();
m_orbVar = CORBA::ORB::_nil();
///////////////////////////
}
catch ( const PortableServer::POA::ObjectNotActive& )
{
// The servant has already been implicitly de-activated
// Or never activated
}
catch ( ... )
{
printf("xxx\n");
}
}
示例6: catch
void
Test_Supplier::disconnect (void)
{
if (CORBA::is_nil (this->consumer_proxy_.in ()))
return;
try
{
this->consumer_proxy_->disconnect_push_consumer ();
}
catch (const CORBA::Exception&)
{
// The consumer may be gone already, so we
// will ignore this exception
}
this->consumer_proxy_ =
RtecEventChannelAdmin::ProxyPushConsumer::_nil ();
// Deactivate the servant
PortableServer::POA_var poa =
this->supplier_._default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (&this->supplier_);
poa->deactivate_object (id.in ());
}
示例7: deactivatePort
void PortSupplier_impl::deactivatePort (PortBase* servant)
{
LOG_TRACE(PortSupplier_impl, "Deactivating port '" << servant->getName() << "'");
PortableServer::POA_var poa = servant->_default_POA();
PortableServer::ObjectId_var oid = poa->servant_to_id(servant);
poa->deactivate_object(oid);
}
示例8:
OnlineViewerServer::~OnlineViewerServer()
{
delete impl;
PortableServer::POA_var poa = _default_POA();
PortableServer::ObjectId_var id = poa->servant_to_id(this);
poa->deactivate_object(id);
}
示例9:
OpenHRPOnlineViewerItemImpl::~OpenHRPOnlineViewerItemImpl()
{
PortableServer::POA_var poa = _default_POA();
PortableServer::ObjectId_var id = poa->servant_to_id(this);
poa->deactivate_object(id);
worldItemConnections.disconnect();
}
示例10:
void
deactivate_servant (PortableServer::Servant servant)
{
PortableServer::POA_var poa =
servant->_default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (servant);
poa->deactivate_object (id.in ());
}
示例11: poa
void
TAO_Notify_ThreadPool_Supplier::deactivate (void)
{
PortableServer::POA_var poa (this->_default_POA ());
PortableServer::ObjectId_var id (poa->servant_to_id (this));
poa->deactivate_object (id.in());
}
示例12:
void
TAO_Notify_Tests_Peer_T<Peer_Traits>::deactivate (void)
{
PortableServer::POA_var poa = this->_default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (this);
poa->deactivate_object (id.in ());
}
示例13:
void
Session::destroy (void)
{
// Make sure local resources are released
PortableServer::POA_var poa =
this->_default_POA ();
PortableServer::ObjectId_var oid =
poa->servant_to_id (this);
poa->deactivate_object (oid.in ());
}
示例14:
void
Object_Group_i::destroy (void)
{
// Deregister with POA.
PortableServer::POA_var poa =
this->_default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (this);
poa->deactivate_object (id.in ());
}
示例15:
void
TAO_Offer_Id_Iterator::destroy (void)
{
// Remove self from POA
PortableServer::POA_var poa =
this->_default_POA ();
PortableServer::ObjectId_var id =
poa->servant_to_id (this);
poa->deactivate_object (id.in ());
}