summaryrefslogtreecommitdiff
path: root/ACE/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h')
-rw-r--r--ACE/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/ACE/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h b/ACE/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h
new file mode 100644
index 00000000000..c60f09b3175
--- /dev/null
+++ b/ACE/TAO/tests/Portable_Interceptors/Request_Interceptor_Flow/Client_Request_Interceptor.h
@@ -0,0 +1,91 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Client_Request_Interceptor.h
+ *
+ * $Id$
+ *
+ * Implementation header for the client request interceptor for the
+ * request interceptor flow test.
+ *
+ * @author Ossama Othman <ossama@uci.edu>
+ */
+//=============================================================================
+
+#ifndef CLIENT_REQUEST_INTERCEPTOR_H
+#define CLIENT_REQUEST_INTERCEPTOR_H
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Request_Interceptor.h"
+
+#include "tao/PI/PI.h"
+#include "tao/PortableInterceptorC.h"
+#include "tao/LocalObject.h"
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+/**
+ * @class Client_Request_Interceptor
+ *
+ * @brief Client request interceptor that exercises
+ * PortableInterceptor::ForwardRequest support.
+ *
+ */
+class Client_Request_Interceptor
+ : public virtual PortableInterceptor::ClientRequestInterceptor,
+ public virtual ::CORBA::LocalObject,
+ public virtual Request_Interceptor
+{
+public:
+
+ /// Constructor.
+ Client_Request_Interceptor (const char *name);
+
+ /**
+ * @name Methods Required by the Client Request Interceptor
+ * Interface
+ *
+ * These are methods that must be implemented since they are pure
+ * virtual in the abstract base class. They are the canonical
+ * methods required for all client request interceptors.
+ */
+ //@{
+ virtual void send_request (
+ PortableInterceptor::ClientRequestInfo_ptr ri);
+
+ virtual void send_poll (
+ PortableInterceptor::ClientRequestInfo_ptr ri);
+
+ virtual void receive_reply (
+ PortableInterceptor::ClientRequestInfo_ptr ri);
+
+ virtual void receive_exception (
+ PortableInterceptor::ClientRequestInfo_ptr ri);
+
+ virtual void receive_other (
+ PortableInterceptor::ClientRequestInfo_ptr ri);
+ //@}
+
+private:
+
+ // Returns 1 if the client-side test is currently being run, and 0
+ // otherwise.
+ CORBA::Boolean client_side_test (
+ PortableInterceptor::ClientRequestInfo_ptr info);
+
+};
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#endif /* CLIENT_REQUEST_INTERCEPTOR_H */