本文整理汇总了C++中TAO_Stub::orb_core方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_Stub::orb_core方法的具体用法?C++ TAO_Stub::orb_core怎么用?C++ TAO_Stub::orb_core使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAO_Stub
的用法示例。
在下文中一共展示了TAO_Stub::orb_core方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
TAO::Invocation_Retry_State::Invocation_Retry_State (TAO_Stub &stub)
: forward_on_reply_closed_count_ (0)
, forward_on_exception_limit_used_ (false)
{
this->ex_count_map_[FOE_OBJECT_NOT_EXIST] = 0;
this->ex_count_map_[FOE_COMM_FAILURE] = 0;
this->ex_count_map_[FOE_TRANSIENT] = 0;
this->ex_count_map_[FOE_INV_OBJREF] = 0;
// Cast away const to avoid tedious iterator operations on the ACE_Array_Map.
TAO::Invocation_Retry_Params &command_line_params =
const_cast<TAO::Invocation_Retry_Params &> (stub.orb_core ()
->orb_params ()->invocation_retry_params ());
TAO::Invocation_Retry_Params &client_factory_params =
const_cast<TAO::Invocation_Retry_Params &> (stub.orb_core ()
->client_factory ()->invocation_retry_params ());
retry_params_calc(command_line_params,
client_factory_params,
this->retry_params_);
for (Invocation_Retry_Params::exception_limit_map_type::const_iterator i =
this->retry_params_.forward_on_exception_limit_.begin();
i != this->retry_params_.forward_on_exception_limit_.end(); ++i)
{
if (i->second > 0)
{
forward_on_exception_limit_used_ = true;
break;
}
}
}
示例2:
void
Asynch_Invocation_Adapter::invoke (
Messaging::ReplyHandler_ptr reply_handler_ptr,
const TAO_Reply_Handler_Stub &reply_handler_stub)
{
TAO_Stub * stub =
this->get_stub ();
if (TAO_debug_level >= 4)
{
TAOLIB_DEBUG ((LM_DEBUG,
"TAO_Messaging (%P|%t) - Asynch_Invocation_Adapter::"
"invoke\n"));
}
// If the reply handler is nil, we do not create a reply dispatcher.
// The ORB will drop replies to which it cannot associate a reply
// dispatcher.
if (!CORBA::is_nil (reply_handler_ptr))
{
// New reply dispatcher on the heap or allocator, because
// we will go out of scope and hand over the reply dispatcher
// to the ORB.
TAO_Asynch_Reply_Dispatcher *rd = 0;
// Get the allocator we could use.
ACE_Allocator* ami_allocator =
stub->orb_core ()->lane_resources().ami_response_handler_allocator();
// If we have an allocator, use it, else use the heap.
if (ami_allocator)
{
ACE_NEW_MALLOC (
rd,
static_cast<TAO_Asynch_Reply_Dispatcher *> (
ami_allocator->malloc (sizeof (TAO_Asynch_Reply_Dispatcher))),
TAO_Asynch_Reply_Dispatcher (reply_handler_stub,
reply_handler_ptr,
stub->orb_core (),
ami_allocator));
}
else
{
ACE_NEW (rd,
TAO_Asynch_Reply_Dispatcher (reply_handler_stub,
reply_handler_ptr,
stub->orb_core (),
0));
}
if (rd == 0)
{
throw ::CORBA::NO_MEMORY ();
}
this->safe_rd_.reset (rd);
}
Invocation_Adapter::invoke (0, 0);
}