1 #include "tao/CSD_ThreadPool/CSD_TP_Dispatchable_Visitor.h"
3 #if !defined (__ACE_INLINE__)
4 # include "tao/CSD_ThreadPool/CSD_TP_Dispatchable_Visitor.inl"
5 #endif /* ! __ACE_INLINE__ */
7 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
9 TAO::CSD::TP_Dispatchable_Visitor::~TP_Dispatchable_Visitor()
15 TAO::CSD::TP_Dispatchable_Visitor::visit_request(TP_Request
* request
,
18 // Ask the request object if the target servant is "ready" to accept
19 // a request being dispatched to it.
20 if (request
->is_ready())
22 // Ok. This request is a "dispatchable" request. It is what we were
25 // Save a copy of the request in our handle data member.
27 this->request_
= request
;
29 // Make sure that the queue will extract the request from the queue
33 // Mark the target servant as being "busy".
34 request
->mark_as_busy();
36 // Stop the visitation by returning false.
40 // The target servant object of the request isn't ready, so the request
41 // is not considered to be a "dispatchable" request.
43 // Return true to visit the next request in the queue (if there is one).
47 TAO_END_VERSIONED_NAMESPACE_DECL