3 //=============================================================================
5 * @file CSD_TP_Custom_Synch_Request.h
7 * @author Tim Bradley <bradley_t@ociweb.com>
9 //=============================================================================
11 #ifndef TAO_CSD_TP_CUSTOM_SYNCH_REQUEST_H
12 #define TAO_CSD_TP_CUSTOM_SYNCH_REQUEST_H
14 #include /**/ "ace/pre.h"
16 #include "tao/CSD_ThreadPool/CSD_TP_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/CSD_ThreadPool/CSD_TP_Custom_Request.h"
23 #include "tao/CSD_ThreadPool/CSD_TP_Synch_Helper.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 class TP_Custom_Synch_Request
;
32 typedef TAO_Intrusive_Ref_Count_Handle
<TP_Custom_Synch_Request
>
33 TP_Custom_Synch_Request_Handle
;
36 * @class TP_Custom_Synch_Request
38 * @brief Base class for "queue-able", Custom (non-CORBA),
39 * Synchronous requests.
41 * TBD - Add description
44 class TAO_CSD_TP_Export TP_Custom_Synch_Request
: public TP_Custom_Request
48 TP_Custom_Synch_Request(TP_Custom_Request_Operation
* op
,
49 TP_Servant_State
* servant_state
);
51 /// Virtual Destructor.
52 virtual ~TP_Custom_Synch_Request();
54 /// Wait until the request has been executed (and completes), or
55 /// until it has been cancelled. Returns true if the request has
56 /// been executed/completed, and returns false if the request has
61 /// Dispatch the request to the servant.
62 virtual void dispatch_i();
64 /// Cancel the request.
65 virtual void cancel_i();
68 /// Helper used to block and unblock the thread that invokes our
70 TP_Synch_Helper synch_helper_
;
75 TAO_END_VERSIONED_NAMESPACE_DECL
77 #if defined (__ACE_INLINE__)
78 # include "tao/CSD_ThreadPool/CSD_TP_Custom_Synch_Request.inl"
79 #endif /* __ACE_INLINE__ */
81 #include /**/ "ace/post.h"
83 #endif /* TAO_CSD_TP_CUSTOM_SYNCH_REQUEST_H */