本文整理汇总了C++中TAO_ServerRequest::is_queued方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_ServerRequest::is_queued方法的具体用法?C++ TAO_ServerRequest::is_queued怎么用?C++ TAO_ServerRequest::is_queued使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAO_ServerRequest
的用法示例。
在下文中一共展示了TAO_ServerRequest::is_queued方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
TAO::CSD::Strategy_Base::DispatchResult
TAO_DTP_POA_Strategy::dispatch_remote_request_i
(TAO_ServerRequest& server_request,
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
PortableServer::Servant servant)
{
TAO::CSD::TP_Servant_State::HandleType servant_state =
this->get_servant_state (servant);
// Handle the one ways that are SYNC_WITH_SERVER and not collocated.
// before queuing the request and thus avoid delaying the client.
// This is a problem if the servant ends up throwing a Location Forward
// exception. If necessary, add an override config option here.
CORBA::Boolean early_sync = true;
server_request.is_queued (early_sync);
server_request.sync_before_dispatch ();
// Now we can create the TP_Remote_Request object, and then add it to our
// task_'s "request queue".
//
// TBD-CSD: Need to use a Cached Allocator to "create" the
// TP_Remote_Request objects. For now, use the heap.
TAO::CSD::TP_Remote_Request *req_ptr;
ACE_NEW_RETURN (req_ptr,
TAO::CSD::TP_Remote_Request (server_request,
object_id,
poa,
operation,
servant,
servant_state.in ()),
TAO::CSD::Strategy_Base::DISPATCH_REJECTED);
TAO::CSD::TP_Remote_Request_Handle request = req_ptr;
// Hand the request object to our task so that it can add the request
// to its "request queue".
if (!this->dtp_task_.add_request (request.in ()))
{
// Return the DISPATCH_REJECTED return code so that the caller (our
// base class' dispatch_request() method) knows that we did
// not handle the request, and that it should be rejected.
return TAO::CSD::Strategy_Base::DISPATCH_REJECTED;
}
return TAO::CSD::Strategy_Base::DISPATCH_HANDLED;
}