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
53 ServerRequestInterceptor (const char * orb_id
,
54 PortableServer::Current_ptr poa_current
);
57 * @name Methods Required by the Server Request Interceptor
60 * These are methods that must be implemented since they are pure
61 * virtual in the abstract base class. They are the canonical
62 * methods required for all server request interceptors.
65 /// Return the name of this ServerRequestinterceptor.
66 virtual char * name (void);
68 virtual void destroy (void);
70 virtual void receive_request_service_contexts (
71 PortableInterceptor::ServerRequestInfo_ptr ri
);
73 virtual void receive_request (
74 PortableInterceptor::ServerRequestInfo_ptr ri
);
76 virtual void send_reply (
77 PortableInterceptor::ServerRequestInfo_ptr ri
);
79 virtual void send_exception (
80 PortableInterceptor::ServerRequestInfo_ptr ri
);
82 virtual void send_other (
83 PortableInterceptor::ServerRequestInfo_ptr ri
);
88 /// The ORBid of the ORB with which this interceptor is registered.
89 CORBA::String_var orb_id_
;
91 /// Reference to the POACurrent object.
93 * This reference will be used to verify that the POA that
94 * dispatched the request intercepted by this interceptor was infact
95 * a child POA, and not the RootPOA.
97 PortableServer::Current_var poa_current_
;
102 #if defined(_MSC_VER)
104 #endif /* _MSC_VER */
106 #endif /* SERVER_REQUEST_INTERCEPTOR_H */