Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_3926_Regression / Client_Request_Interceptor.h
blobeca718ce32acb3f769a0f3e3ac846b1ec54bd0b4
1 // -*- C++ -*-
2 #ifndef CLIENT_REQUEST_INTERCEPTOR_H
3 #define CLIENT_REQUEST_INTERCEPTOR_H
5 #include "ace/config-all.h"
7 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 # pragma once
9 #endif /* ACE_LACKS_PRAGMA_ONCE */
11 #include "tao/PI/PI.h"
12 #include "tao/PortableInterceptorC.h"
13 #include "tao/LocalObject.h"
14 #include "tao/ORB.h"
15 #include "tao/CORBA_String.h"
17 class Client_Request_Interceptor
18 : public virtual PortableInterceptor::ClientRequestInterceptor,
19 public virtual CORBA::LocalObject
21 public:
23 /// Constructor.
24 Client_Request_Interceptor (const char *orb_id,
25 const char *forward_str);
27 /**
28 * @name Methods Required by the Client Request Interceptor
29 * Interface
31 * These are methods that must be implemented since they are pure
32 * virtual in the abstract base class. They are the canonical
33 * methods required for all client request interceptors.
35 //@{
36 /// Return the name of this ClientRequestinterceptor.
37 virtual char * name (void);
39 virtual void destroy (void);
41 virtual void send_request (
42 PortableInterceptor::ClientRequestInfo_ptr ri);
44 virtual void send_poll (
45 PortableInterceptor::ClientRequestInfo_ptr ri);
47 virtual void receive_reply (
48 PortableInterceptor::ClientRequestInfo_ptr ri);
50 virtual void receive_exception (
51 PortableInterceptor::ClientRequestInfo_ptr ri);
53 virtual void receive_other (
54 PortableInterceptor::ClientRequestInfo_ptr ri);
55 //@}
57 private:
59 ///The ID of the ORB this interceptor is registered with.
60 CORBA::String_var orb_id_;
62 /// Pseudo-reference to the ORB this interceptor is registered
63 /// with.
64 CORBA::ORB_var orb_;
66 /// The number of requests intercepted by this interceptor.
67 CORBA::ULong request_count_;
69 /// Stringified reference to the object the initial request will be
70 /// forwarded to by this interceptor.
71 CORBA::String_var forward_str_;
75 #endif /* CLIENT_REQUEST_INTERCEPTOR_H */