3 //=============================================================================
5 * @file CSD_FW_Server_Request_Wrapper.h
7 * @author Tim Bradley <bradley_t@ociweb.com>
9 //=============================================================================
11 #ifndef TAO_CSD_FW_SERVER_REQUEST_WRAPPER_H
12 #define TAO_CSD_FW_SERVER_REQUEST_WRAPPER_H
14 #include /**/ "ace/pre.h"
16 #include "tao/CSD_Framework/CSD_FW_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/TAO_Server_Request.h"
23 #include "tao/operation_details.h"
24 #include "tao/PortableServer/Servant_Base.h"
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 * @class FW_Server_Request_Wrapper
35 * @brief Wrapper around a TAO_Server_Request that will be cloned
38 * This CSD Framework class is used to provide an interface to a
39 * TAO_ServerRequest object such that it can be used for CSD strategies
40 * that need to clone TAO_Server_Requests (ie, so that they may be
41 * placed on a queue to be dispatched by another thread).
43 * There are several purposes for this class, with the main thing being
44 * that the TAO_ServerRequest object is not used directly by the
45 * CSD Strategies since it is, after all, an internal TAO class that was
46 * never meant to be exposed. Future changes to TAO's internal design
47 * may cause disruption in the TAO_ServerRequest class. These changes
48 * would only need to be accounted for here in this
49 * FW_Server_Request_Wrapper class' implementation, and all CSD
50 * Strategies will work again. It's a maintenance issue.
52 * @note: The CSD namespace is inside of TAO namespace in current
53 * implementation. This can be changed but, at least for now, it's
54 * already been delivered to some customs, we leave it as-is. If it
55 * needs to change, we will make this change.
57 class TAO_CSD_FW_Export FW_Server_Request_Wrapper
61 FW_Server_Request_Wrapper(TAO_ServerRequest
& server_request
);
64 ~FW_Server_Request_Wrapper();
66 /// Perform the clone operation.
69 /// Dispatch the request to the servant.
71 PortableServer::Servant servant
,
72 TAO::Portable_Server::Servant_Upcall
*servant_upcall
);
74 /// Cancel the request.
78 /// Create a deep copy of the request_ object.
79 /// The other clone methods are used to support the TAO_ServerRequest clone.
80 TAO_ServerRequest
* clone (TAO_ServerRequest
*& from
);
82 /// Clone an input cdr stream.
83 TAO_InputCDR
* clone (TAO_InputCDR
*& from
);
85 /// Create a deep copy of a TAO_Operation_Details object and marshall
86 /// the arguments into a TAO_InputCDR stream. The cloned TAO_Operation_Details
87 /// object is created without any arguments. This would help the skeleton
88 /// code to determine whether the arguments are in the operation_details_
89 /// object or should be demarshalled from the incoming_ stream in the request_
91 bool clone (TAO_Operation_Details
const *& from
,
92 TAO_Operation_Details
const *& to
,
95 /// Clone the TAO_Tagged_Profile object.
96 void clone (TAO_Tagged_Profile
& from
, TAO_Tagged_Profile
& to
);
98 /// Clone the TAO_Service_Context object.
99 void clone (TAO_Service_Context
& from
, TAO_Service_Context
& to
);
101 /// Create a TAO_OutputCDR stream initialized with a heap allocated
103 TAO_OutputCDR
* create_new_output_cdr ();
105 /// A flag that indicates that the TAO_ServerRequest object
106 /// is already cloned.
109 /// Pointer to the underlying TAO_ServerRequest object.
110 TAO_ServerRequest
* request_
;
115 TAO_END_VERSIONED_NAMESPACE_DECL
117 #if defined (__ACE_INLINE__)
118 # include "tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.inl"
119 #endif /* __ACE_INLINE__ */
121 #include /**/ "ace/post.h"
123 #endif /* TAO_CSD_FW_SERVER_REQUEST_WRAPPER_H */