00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file CSD_TP_Collocated_Asynch_Request.h 00006 * 00007 * $Id: CSD_TP_Collocated_Asynch_Request.h 71473 2006-03-10 07:19:20Z jtc $ 00008 * 00009 * @author Tim Bradley <bradley_t@ociweb.com> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_CSD_TP_COLLOCATED_ASYNCH_REQUEST_H 00014 #define TAO_CSD_TP_COLLOCATED_ASYNCH_REQUEST_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include "tao/CSD_ThreadPool/CSD_TP_Export.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "tao/CSD_ThreadPool/CSD_TP_Corba_Request.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 namespace TAO 00029 { 00030 namespace CSD 00031 { 00032 00033 class TP_Collocated_Asynch_Request; 00034 typedef TAO_Intrusive_Ref_Count_Handle<TP_Collocated_Asynch_Request> 00035 TP_Collocated_Asynch_Request_Handle; 00036 00037 /** 00038 * @class TP_Collocated_Asynch_Request 00039 * 00040 * @brief Represents a "queue-able", collocated, asynchronous, 00041 * CORBA request. 00042 * 00043 * This kind request is one-way collocated request with the default 00044 * SYNC_SCOPE policy (SYNC_WITH_TRANSPORT) applied. It is cloned 00045 * before enqueuing and the "enqueuing" thread never blocks. 00046 */ 00047 class TAO_CSD_TP_Export TP_Collocated_Asynch_Request 00048 : public TP_Corba_Request 00049 { 00050 public: 00051 00052 /// Constructor. 00053 TP_Collocated_Asynch_Request 00054 (TAO_ServerRequest& server_request, 00055 const PortableServer::ObjectId& object_id, 00056 PortableServer::POA_ptr poa, 00057 const char* operation, 00058 PortableServer::Servant servant, 00059 TP_Servant_State* servant_state); 00060 00061 /// Virtual Destructor. 00062 virtual ~TP_Collocated_Asynch_Request(); 00063 00064 00065 protected: 00066 00067 /// Prepare this TP_Collocated_Asynch_Request object to be placed 00068 /// into the request queue. This will cause the underlying 00069 /// TAO_ServerRequest object to be cloned. 00070 virtual void prepare_for_queue_i(); 00071 00072 /// Dispatch the request to the servant. 00073 virtual void dispatch_i(); 00074 00075 /// Cancel the request. 00076 virtual void cancel_i(); 00077 }; 00078 00079 } 00080 } 00081 00082 TAO_END_VERSIONED_NAMESPACE_DECL 00083 00084 #if defined (__ACE_INLINE__) 00085 # include "tao/CSD_ThreadPool/CSD_TP_Collocated_Asynch_Request.inl" 00086 #endif /* __ACE_INLINE__ */ 00087 00088 #include /**/ "ace/post.h" 00089 00090 #endif /* TAO_CSD_TP_COLLOCATED_ASYNCH_REQUEST_H */