00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file CSD_TP_Remote_Request.h 00006 * 00007 * $Id: CSD_TP_Remote_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_REMOTE_REQUEST_H 00014 #define TAO_CSD_TP_REMOTE_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_Remote_Request; 00034 typedef TAO_Intrusive_Ref_Count_Handle<TP_Remote_Request> 00035 TP_Remote_Request_Handle; 00036 00037 /** 00038 * @class TP_Remote_Request 00039 * 00040 * @brief Represents a "queue-able", remote, CORBA request. 00041 * Both syncronous and asynchronous remote CORBA requests 00042 * are represented by the class. 00043 * 00044 * TBD - Go over the following comments and clean up. 00045 * 00046 * Since this class derives from the TP_Request class, it can be 00047 * added to a TP_Queue (ie, it is a "queueable" request). It 00048 * represents a servant request that has been made by a remote 00049 * CORBA client (as opposed to a collocated CORBA client). The 00050 * term "CORBA client" is being used here to distinguish CORBA 00051 * servant requests (those made thru a CORBA object reference), and 00052 * "Custom" servant requests that can be "dispatched" to the strategy 00053 * directly by the client application code (ie, not thru a CORBA 00054 * object reference). Thus, there are "CORBA clients" and 00055 * "Direct clients". 00056 * 00057 * In summary, this class represents a servant request made when a 00058 * remote client invokes a method on a CORBA object reference. 00059 * 00060 */ 00061 class TAO_CSD_TP_Export TP_Remote_Request : public TP_Corba_Request 00062 { 00063 public: 00064 00065 /// Constructor. 00066 TP_Remote_Request(TAO_ServerRequest& server_request, 00067 const PortableServer::ObjectId& object_id, 00068 PortableServer::POA_ptr poa, 00069 const char* operation, 00070 PortableServer::Servant servant, 00071 TP_Servant_State* servant_state); 00072 00073 /// Virtual Destructor. 00074 virtual ~TP_Remote_Request(); 00075 00076 00077 protected: 00078 00079 /// Prepare this TP_Remote_Request object to be placed into the 00080 /// request queue. This will cause the underlying TAO_ServerRequest 00081 /// object to be cloned. 00082 virtual void prepare_for_queue_i(); 00083 00084 /// Dispatch the request to the servant. 00085 virtual void dispatch_i(); 00086 00087 /// Cancel the request. 00088 virtual void cancel_i(); 00089 }; 00090 00091 } 00092 } 00093 00094 TAO_END_VERSIONED_NAMESPACE_DECL 00095 00096 #if defined (__ACE_INLINE__) 00097 # include "tao/CSD_ThreadPool/CSD_TP_Remote_Request.inl" 00098 #endif /* __ACE_INLINE__ */ 00099 00100 #include /**/ "ace/post.h" 00101 00102 #endif /* TAO_CSD_TP_REMOTE_REQUEST_H */