3 //=============================================================================
5 * @file ServerRequestInterceptor.h
7 * Implementation header for the server request interceptor for the
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)
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"
33 #pragma warning(disable:4250)
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
52 ServerRequestInterceptor (const char * orb_id
,
53 PortableServer::Current_ptr poa_current
);
56 * @name Methods Required by the Server Request Interceptor
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.
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
);
86 /// The ORBid of the ORB with which this interceptor is registered.
87 CORBA::String_var orb_id_
;
89 /// Reference to the POACurrent object.
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_
;
101 #endif /* _MSC_VER */
103 #endif /* SERVER_REQUEST_INTERCEPTOR_H */