3 //=============================================================================
5 * @file Server_Request_Interceptor.h
7 * Implementation header for the server request interceptor for the
8 * PortableInterceptor::ForwardRequest 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.h"
18 #include /**/ "Current_Test_Export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "Current_TestC.h"
26 #include "tao/TransportCurrent/TCC.h"
27 #include "tao/PortableInterceptorC.h"
28 #include "tao/LocalObject.h"
29 #include "tao/PI_Server/PI_Server.h"
33 /// A metod doing the actual testing, so we could change it for the
34 /// different traits implementations
36 typedef int (*TEST
) (CORBA::ORB_ptr
);
39 * @class Server_Request_Interceptor
41 * @brief Simple concrete server request interceptor.
44 class Current_Test_Export Server_Request_Interceptor
45 : public virtual PortableInterceptor::ServerRequestInterceptor
,
46 public virtual ::CORBA::LocalObject
50 Server_Request_Interceptor (const char*orb_id
, TEST test
);
53 virtual ~Server_Request_Interceptor ();
55 virtual void test_transport_current (const ACE_TCHAR
* amethod
);
58 virtual bool self_test ();
61 * @name Methods Required by the Server Request Interceptor
64 * These are methods that must be implemented since they are pure
65 * virtual in the abstract base class. They are the canonical
66 * methods required for all server request interceptors.
69 /// Return the name of this ServerRequestinterceptor.
70 virtual char * name ();
72 virtual void destroy ();
74 virtual void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr ri
);
76 virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri
);
78 virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
);
80 virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
);
82 virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri
);
86 /// The number of requests intercepted by this interceptor.
87 CORBA::ULong request_count_
;
89 CORBA::String_var orb_id_
;
95 #endif /* SERVER_REQUEST_INTERCEPTOR_H */