Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / ServerRequestInterceptor_Adapter.h
blobd4d36949cad1ae925e4844163632343c91bf44f9
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ServerRequestInterceptor_Adapter.h
7 * This file an adapter class to simplify the support of
8 * interceptors.
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)
23 # 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;
43 namespace CORBA
45 class PolicyList;
48 class TAO_ServerRequest;
50 namespace TAO
52 class ServerRequestInfo;
53 class Argument;
54 class PICurrent_Impl;
55 class Upcall_Command;
57 namespace Portable_Server
59 class Servant_Upcall;
62 /**
63 * @class ServerRequestInterceptor_Adapter
65 class TAO_Export ServerRequestInterceptor_Adapter
66 : public RequestInterceptor_Adapter
68 public:
69 virtual ~ServerRequestInterceptor_Adapter ();
71 /**
72 * @name PortableInterceptor Server Side Interception Points
74 * Each of these methods corresponds to a client side interception
75 * point.
77 //@{
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[],
85 size_t nargs,
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.
95 ///
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[],
102 size_t nargs,
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[],
111 size_t nargs,
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[],
121 size_t nargs,
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[],
131 size_t nargs,
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[],
141 size_t nargs,
142 TAO::Portable_Server::Servant_Upcall *servant_upcall,
143 CORBA::TypeCode_ptr const * exceptions,
144 CORBA::ULong nexceptions) = 0;
145 //@}
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 */