3
//=============================================================================
5
* @file Client_Request_Interceptor.h
7
* Client_Request_Interceptor.h,v 1.3 2002/01/29 20:21:09 okellogg Exp
9
* Implementation header for the client request interceptor for the
10
* PortableInterceptor::ForwardRequest test.
12
* @author Ossama Othman <ossama@uci.edu>
14
//=============================================================================
16
#ifndef CLIENT_REQUEST_INTERCEPTOR_H
17
#define CLIENT_REQUEST_INTERCEPTOR_H
19
#include "ace/config-all.h"
21
#if !defined (ACE_LACKS_PRAGMA_ONCE)
23
#endif /* ACE_LACKS_PRAGMA_ONCE */
25
#include "tao/PortableInterceptorC.h"
26
#include "tao/LocalObject.h"
28
#include "tao/CORBA_String.h"
31
#if (_MSC_VER >= 1200)
33
#endif /* _MSC_VER >= 1200 */
34
#pragma warning(disable:4250)
38
* @class Client_Request_Interceptor
40
* @brief Client request interceptor that exercises
41
* PortableInterceptor::ForwardRequest support.
43
* This client request interceptor forwards a request to a secondary
44
* object by throwing the PortableInterceptor::ForwardRequest
45
* exception from within the send_request() interception point. It
46
* only forwards the initial request. See the README file for
49
class Client_Request_Interceptor
50
: public virtual PortableInterceptor::ClientRequestInterceptor,
51
public virtual TAO_Local_RefCounted_Object
56
Client_Request_Interceptor (const char *orb_id,
57
const char *forward_str);
60
* @name Methods Required by the Client Request Interceptor
63
* These are methods that must be implemented since they are pure
64
* virtual in the abstract base class. They are the canonical
65
* methods required for all client request interceptors.
68
/// Return the name of this ClientRequestinterceptor.
69
virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
70
ACE_THROW_SPEC ((CORBA::SystemException));
72
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
73
ACE_THROW_SPEC ((CORBA::SystemException));
75
virtual void send_request (
76
PortableInterceptor::ClientRequestInfo_ptr ri
77
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
78
ACE_THROW_SPEC ((CORBA::SystemException,
79
PortableInterceptor::ForwardRequest));
81
virtual void send_poll (
82
PortableInterceptor::ClientRequestInfo_ptr ri
83
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
84
ACE_THROW_SPEC ((CORBA::SystemException));
86
virtual void receive_reply (
87
PortableInterceptor::ClientRequestInfo_ptr ri
88
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
89
ACE_THROW_SPEC ((CORBA::SystemException));
91
virtual void receive_exception (
92
PortableInterceptor::ClientRequestInfo_ptr ri
93
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
94
ACE_THROW_SPEC ((CORBA::SystemException,
95
PortableInterceptor::ForwardRequest));
97
virtual void receive_other (
98
PortableInterceptor::ClientRequestInfo_ptr ri
99
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
100
ACE_THROW_SPEC ((CORBA::SystemException,
101
PortableInterceptor::ForwardRequest));
106
///The ID of the ORB this interceptor is registered with.
107
CORBA::String_var orb_id_;
109
/// Pseudo-reference to the ORB this interceptor is registered
113
/// The number of requests intercepted by this interceptor.
114
CORBA::ULong request_count_;
116
/// Stringified reference to the object the initial request will be
117
/// forwarded to by this interceptor.
118
CORBA::String_var forward_str_;
122
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
124
#endif /* _MSC_VER */
126
#endif /* CLIENT_REQUEST_INTERCEPTOR_H */