2 #ifndef SERVER_REQUEST_INTERCEPTOR_H
3 #define SERVER_REQUEST_INTERCEPTOR_H
5 #include "ace/config-all.h"
7 #if !defined (ACE_LACKS_PRAGMA_ONCE)
9 #endif /* ACE_LACKS_PRAGMA_ONCE */
12 #include "tao/LocalObject.h"
16 #pragma warning(disable:4250)
20 * @class Server_Request_Interceptor
22 * @brief Simple concrete server request interceptor.
24 class Server_Request_Interceptor
25 : public virtual Collocated_ForwardRequestTest::ServerRequestInterceptor
,
26 public virtual ::CORBA::LocalObject
30 Server_Request_Interceptor (CORBA::ULong request_pass_count
);
32 /// Set the references to which requests will be forwarded.
33 virtual void forward (CORBA::Object_ptr to
);
36 * @name Methods Required by the Server Request Interceptor
39 * These are methods that must be implemented since they are pure
40 * virtual in the abstract base class. They are the canonical
41 * methods required for all server request interceptors.
44 /// Return the name of this ServerRequestinterceptor.
45 virtual char * name ();
47 virtual void destroy ();
49 virtual void receive_request_service_contexts (
50 PortableInterceptor::ServerRequestInfo_ptr ri
);
52 virtual void receive_request (
53 PortableInterceptor::ServerRequestInfo_ptr ri
);
55 virtual void send_reply (
56 PortableInterceptor::ServerRequestInfo_ptr ri
);
58 virtual void send_exception (
59 PortableInterceptor::ServerRequestInfo_ptr ri
);
61 virtual void send_other (
62 PortableInterceptor::ServerRequestInfo_ptr ri
);
66 /// How much requests to pass thru before forwarding.
67 CORBA::ULong request_pass_count_
;
69 /// The number of requests intercepted by this interceptor.
70 CORBA::ULong request_count_
;
72 /// References to the object used in this test.
73 CORBA::Object_ptr to_
;
80 #endif /* SERVER_REQUEST_INTERCEPTOR_H */