3 //=============================================================================
5 * @file ClientRequestInterceptor.h
7 * @author Ossama Othman <ossama@uci.edu>
9 //=============================================================================
11 #ifndef CLIENT_REQUEST_INTERCEPTOR_H
12 #define CLIENT_REQUEST_INTERCEPTOR_H
14 #include "ace/config-all.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "tao/PI/PI.h"
21 #include "tao/PortableInterceptorC.h"
22 #include "tao/LocalObject.h"
26 #pragma warning(disable:4250)
30 * @class ClientRequestInterceptor
32 * @brief Simple concrete client request interceptor.
34 * This is a test client request interceptor that verifies that the
35 * client side PICurrent semantics are correct. In particular, it
36 * verifies that the request-scope current (RSC) is not modified after
37 * the contents of the thread-scope current (TSC) are copied to it.
38 * This is particularly important for ORBs that initially perform a
39 * logical copy for performance reasons.
41 class ClientRequestInterceptor
42 : public virtual PortableInterceptor::ClientRequestInterceptor
,
43 public virtual ::CORBA::LocalObject
48 ClientRequestInterceptor (PortableInterceptor::SlotId slot_id
,
49 PortableInterceptor::Current_ptr pi_current
);
52 * @name Methods Required by the Client Request Interceptor
55 * These are methods that must be implemented since they are pure
56 * virtual in the abstract base class. They are the canonical
57 * methods required for all client request interceptors.
60 /// Return the name of this ClientRequestInterceptor.
61 virtual char * name (void);
63 virtual void destroy (void);
65 virtual void send_request (
66 PortableInterceptor::ClientRequestInfo_ptr ri
);
68 virtual void send_poll (
69 PortableInterceptor::ClientRequestInfo_ptr ri
);
71 virtual void receive_reply (
72 PortableInterceptor::ClientRequestInfo_ptr ri
);
74 virtual void receive_exception (
75 PortableInterceptor::ClientRequestInfo_ptr ri
);
77 virtual void receive_other (
78 PortableInterceptor::ClientRequestInfo_ptr ri
);
83 /// The PICurrent slot ID allocated to this application during ORB
85 PortableInterceptor::SlotId slot_id_
;
87 /// Reference to the PICurrent object.
88 PortableInterceptor::Current_var pi_current_
;
96 #endif /* CLIENT_REQUEST_INTERCEPTOR_H */