Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / ORT / ServerRequestInterceptor.h
blob5e67b3645668edf5d1bda0ed9982bc4757821f11
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ServerRequestInterceptor.h
7 * Implementation header for the server request interceptor for the
8 * ORT test.
10 * @author Ossama Othman <ossama@uci.edu>
12 //=============================================================================
14 #ifndef SERVER_REQUEST_INTERCEPTOR_H
15 #define SERVER_REQUEST_INTERCEPTOR_H
17 #include "ace/config-all.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/PortableInterceptorC.h"
24 #include "tao/LocalObject.h"
25 #include "tao/CORBA_String.h"
27 #include "tao/PortableServer/PortableServer.h"
28 #include "tao/PI_Server/PI_Server.h"
31 #if defined(_MSC_VER)
32 #pragma warning(push)
33 #pragma warning(disable:4250)
34 #endif /* _MSC_VER */
37 /**
38 * @class ServerRequestInterceptor
40 * @brief Simple concrete server request interceptor.
42 * This server request interceptor tests some of the ORT-specific
43 * methods in the ServerRequestInfo object passed to the server
44 * request interception points.
46 class ServerRequestInterceptor
47 : public virtual PortableInterceptor::ServerRequestInterceptor,
48 public virtual ::CORBA::LocalObject
50 public:
51 /// Constructor.
52 ServerRequestInterceptor (const char * orb_id,
53 PortableServer::Current_ptr poa_current);
55 /**
56 * @name Methods Required by the Server Request Interceptor
57 * Interface
59 * These are methods that must be implemented since they are pure
60 * virtual in the abstract base class. They are the canonical
61 * methods required for all server request interceptors.
63 //@{
64 /// Return the name of this ServerRequestinterceptor.
65 virtual char * name ();
67 virtual void destroy ();
69 virtual void receive_request_service_contexts (
70 PortableInterceptor::ServerRequestInfo_ptr ri);
72 virtual void receive_request (
73 PortableInterceptor::ServerRequestInfo_ptr ri);
75 virtual void send_reply (
76 PortableInterceptor::ServerRequestInfo_ptr ri);
78 virtual void send_exception (
79 PortableInterceptor::ServerRequestInfo_ptr ri);
81 virtual void send_other (
82 PortableInterceptor::ServerRequestInfo_ptr ri);
83 //@}
85 private:
86 /// The ORBid of the ORB with which this interceptor is registered.
87 CORBA::String_var orb_id_;
89 /// Reference to the POACurrent object.
90 /**
91 * This reference will be used to verify that the POA that
92 * dispatched the request intercepted by this interceptor was infact
93 * a child POA, and not the RootPOA.
95 PortableServer::Current_var poa_current_;
99 #if defined(_MSC_VER)
100 #pragma warning(pop)
101 #endif /* _MSC_VER */
103 #endif /* SERVER_REQUEST_INTERCEPTOR_H */