Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PICurrent / ClientRequestInterceptor.h
blob7b7f18aac6b8c55205ab9ce77a853b653031fce5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ClientRequestInterceptor.h
7 * @author Ossama Othman <ossama@uci.edu>
8 */
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)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "tao/PI/PI.h"
21 #include "tao/PortableInterceptorC.h"
22 #include "tao/LocalObject.h"
24 #if defined(_MSC_VER)
25 #pragma warning(push)
26 #pragma warning(disable:4250)
27 #endif /* _MSC_VER */
29 /**
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
45 public:
47 /// Constructor.
48 ClientRequestInterceptor (PortableInterceptor::SlotId slot_id,
49 PortableInterceptor::Current_ptr pi_current);
51 /**
52 * @name Methods Required by the Client Request Interceptor
53 * Interface
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.
59 //@{
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);
79 //@}
81 private:
83 /// The PICurrent slot ID allocated to this application during ORB
84 /// initialization.
85 PortableInterceptor::SlotId slot_id_;
87 /// Reference to the PICurrent object.
88 PortableInterceptor::Current_var pi_current_;
92 #if defined(_MSC_VER)
93 #pragma warning(pop)
94 #endif /* _MSC_VER */
96 #endif /* CLIENT_REQUEST_INTERCEPTOR_H */