3 //=============================================================================
5 * @file ServerRequestInterceptor_Adapter.h
7 * This file an adapter class to simplify the support of
10 * @author Johnny Willemsen <jwillemsen@remedy.nl>
12 //=============================================================================
14 #ifndef TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H
15 #define TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "tao/TAO_Export.h"
20 #include "tao/RequestInterceptor_Adapter.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 #include "tao/orbconf.h"
27 #include "tao/Basic_Types.h"
29 #if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
30 # include "tao/OctetSeqC.h"
31 #endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
33 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
35 namespace PortableInterceptor
37 class ServerRequestInterceptor
;
38 typedef ServerRequestInterceptor
*ServerRequestInterceptor_ptr
;
40 typedef CORBA::Short ReplyStatus
;
48 class TAO_ServerRequest
;
52 class ServerRequestInfo
;
57 namespace Portable_Server
63 * @class ServerRequestInterceptor_Adapter
65 class TAO_Export ServerRequestInterceptor_Adapter
66 : public RequestInterceptor_Adapter
69 virtual ~ServerRequestInterceptor_Adapter ();
72 * @name PortableInterceptor Server Side Interception Points
74 * Each of these methods corresponds to a client side interception
78 #if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
79 /// This method implements the "starting" server side interception
80 /// point. It will be used as the first interception point and it is
81 /// proprietary to TAO.
82 virtual void tao_ft_interception_point (
83 TAO_ServerRequest
&server_request
,
84 TAO::Argument
* const args
[],
86 TAO::Portable_Server::Servant_Upcall
*servant_upcall
,
87 CORBA::TypeCode_ptr
const * exceptions
,
88 CORBA::ULong nexceptions
,
89 CORBA::OctetSeq_out oc
) = 0;
90 #endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
92 /// This method implements the "intermediate" server side
93 /// interception point if the above #ifdef is set to 1 and a
94 /// starting interception point if it is not set to 1.
96 /// @note This method should have been the "starting" interception
97 /// point according to the interceptor spec. This will be
98 /// fixed once Bug 1369 is completely done.
99 virtual void receive_request_service_contexts (
100 TAO_ServerRequest
&server_request
,
101 TAO::Argument
* const args
[],
103 TAO::Portable_Server::Servant_Upcall
*servant_upcall
,
104 CORBA::TypeCode_ptr
const * exceptions
,
105 CORBA::ULong nexceptions
) = 0;
107 /// This method an "intermediate" server side interception point.
108 virtual void receive_request (
109 TAO_ServerRequest
&server_request
,
110 TAO::Argument
* const args
[],
112 TAO::Portable_Server::Servant_Upcall
*servant_upcall
,
113 CORBA::TypeCode_ptr
const * exceptions
,
114 CORBA::ULong nexceptions
) = 0;
116 /// This method implements one of the "ending" server side
117 /// interception points.
118 virtual void send_reply (
119 TAO_ServerRequest
&server_request
,
120 TAO::Argument
* const args
[],
122 TAO::Portable_Server::Servant_Upcall
*servant_upcall
,
123 CORBA::TypeCode_ptr
const * exceptions
,
124 CORBA::ULong nexceptions
) = 0;
126 /// This method implements one of the "ending" server side
127 /// interception points.
128 virtual void send_exception (
129 TAO_ServerRequest
&server_request
,
130 TAO::Argument
* const args
[],
132 TAO::Portable_Server::Servant_Upcall
*servant_upcall
,
133 CORBA::TypeCode_ptr
const * exceptions
,
134 CORBA::ULong nexceptions
) = 0;
136 /// This method implements one of the "ending" server side
137 /// interception points.
138 virtual void send_other (
139 TAO_ServerRequest
&server_request
,
140 TAO::Argument
* const args
[],
142 TAO::Portable_Server::Servant_Upcall
*servant_upcall
,
143 CORBA::TypeCode_ptr
const * exceptions
,
144 CORBA::ULong nexceptions
) = 0;
147 /// Register an interceptor.
148 virtual void add_interceptor (
149 PortableInterceptor::ServerRequestInterceptor_ptr interceptor
) = 0;
151 /// Register an interceptor with policies.
152 virtual void add_interceptor (
153 PortableInterceptor::ServerRequestInterceptor_ptr interceptor
,
154 const CORBA::PolicyList
& policies
) = 0;
156 virtual TAO::PICurrent_Impl
*allocate_pi_current () = 0;
158 virtual void deallocate_pi_current (TAO::PICurrent_Impl
*picurrent
) = 0;
160 virtual void execute_command (
161 TAO_ServerRequest
&server_request
,
162 TAO::Upcall_Command
&command
) = 0;
166 TAO_END_VERSIONED_NAMESPACE_DECL
168 #include /**/ "ace/post.h"
170 #endif /* TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H */