3 //=============================================================================
5 * @file ClientRequestInterceptor_Adapter.h
7 * This file an adapter class to simplify the support of
10 * @author Nanbor Wang <nanbor@cs.wustl.edu>
11 * @author Ossama Othman <ossama@uci.edu>
12 * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
14 //=============================================================================
16 #ifndef TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H
17 #define TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H
19 #include /**/ "ace/pre.h"
21 #include /**/ "tao/TAO_Export.h"
22 #include "tao/RequestInterceptor_Adapter.h"
24 #if !defined (ACE_LACKS_PRAGMA_ONCE)
26 #endif /* ACE_LACKS_PRAGMA_ONCE */
28 #include "tao/Invocation_Utils.h"
29 #include "tao/Basic_Types.h"
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 class TAO_ClientRequestInfo
;
35 namespace PortableInterceptor
37 class ClientRequestInterceptor
;
38 typedef ClientRequestInterceptor
*ClientRequestInterceptor_ptr
;
40 typedef CORBA::Short ReplyStatus
;
50 class Invocation_Base
;
53 * @class ClientRequestInterceptor_Adapter
55 * @brief A convenient helper class to invoke registered client request
58 * This class invokes all registered interceptors at interception
59 * point, and enforces flow rules dictated by the Portable Interceptor
60 * specification/chapter.
62 class TAO_Export ClientRequestInterceptor_Adapter
63 : public RequestInterceptor_Adapter
66 virtual ~ClientRequestInterceptor_Adapter ();
69 * @name PortableInterceptor Client Side Interception Points
71 * Each of these methods corresponds to a client side interception
72 * point. There are no "intermediate" interception points on the
73 * client side, only "starting" and "ending" interception points.
77 /// This method implements one of the "starting" client side
78 /// interception points.
79 virtual void send_request (Invocation_Base
&invocation
) = 0;
81 /// This method implements one of the "ending" client side
82 /// interception point.
83 virtual void receive_reply (Invocation_Base
&invocation
) = 0;
85 /// This method implements one of the "ending" client side
86 /// interception point.
87 virtual void receive_exception (Invocation_Base
&invocation
) = 0;
89 /// This method implements one of the "ending" client side
90 /// interception point.
91 virtual void receive_other (Invocation_Base
&invocation
) = 0;
93 /// Register an interceptor.
94 virtual void add_interceptor (
95 PortableInterceptor::ClientRequestInterceptor_ptr interceptor
) = 0;
97 /// Register an interceptor with policies.
98 virtual void add_interceptor (
99 PortableInterceptor::ClientRequestInterceptor_ptr interceptor
,
100 const CORBA::PolicyList
& policies
) = 0;
102 /// Convert TAO Invocation status to a PI status
103 virtual PortableInterceptor::ReplyStatus
pi_reply_status (
104 TAO::Invocation_Base
const &invocation_base
) = 0;
108 TAO_END_VERSIONED_NAMESPACE_DECL
110 #include /**/ "ace/post.h"
112 #endif /* TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H */