Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Collocated_Forwarding / Server_Request_Interceptor.h
blobcdda3618c4eec2deb866a64c413f38c8260b5a43
1 // -*- C++ -*-
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)
8 # pragma once
9 #endif /* ACE_LACKS_PRAGMA_ONCE */
11 #include "testC.h"
12 #include "tao/LocalObject.h"
14 #if defined(_MSC_VER)
15 #pragma warning(push)
16 #pragma warning(disable:4250)
17 #endif /* _MSC_VER */
19 /**
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
28 public:
29 /// Constructor.
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);
35 /**
36 * @name Methods Required by the Server Request Interceptor
37 * Interface
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.
43 //@{
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);
63 //@}
65 private:
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_;
76 #if defined(_MSC_VER)
77 #pragma warning(pop)
78 #endif /* _MSC_VER */
80 #endif /* SERVER_REQUEST_INTERCEPTOR_H */