summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-06-29 01:15:11 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-06-29 01:15:11 +0000
commit5f05f43f2228cddd95f2d5c9d07e2a4f8a30d150 (patch)
tree7c46e0fe747f2db2d5b683f89e9398865b38b967 /TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h
parentdefe27a5f99f0d6326518c263b7a98f01df94d21 (diff)
downloadATCD-5f05f43f2228cddd95f2d5c9d07e2a4f8a30d150.tar.gz
ChangeLogTag:Fri Jun 28 18:08:18 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h
new file mode 100644
index 00000000000..b664866cec9
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_MemberLocator.h
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file LB_MemberLocator.h
+ *
+ * $Id$
+ *
+ * @author Ossama Othman <ossama@uci.edu>
+ */
+//=============================================================================
+
+
+#ifndef TAO_LB_MEMBER_LOCATOR_H
+#define TAO_LB_MEMBER_LOCATOR_H
+
+#include "ace/pre.h"
+
+#include "ace/config-all.h"
+
+# if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+# endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/PortableServer/PortableServerC.h"
+#include "tao/LocalObject.h"
+
+// Forward declarations.
+class TAO_LB_LoadManager;
+
+
+/**
+ * @class TAO_LB_MemberLocator
+ *
+ * @brief ServantLocator implementation for the Load Balancer.
+ *
+ * This is a Servant Locator implementation that forwards requests to
+ * a member returned by the Load Balancer.
+ */
+class TAO_LB_MemberLocator
+ : public virtual PortableServer::ServantLocator,
+ public virtual TAO_Local_RefCounted_Object
+{
+public:
+
+ /// Constructor
+ TAO_LB_MemberLocator (TAO_LB_LoadManager * load_balancer);
+
+ /**
+ * @name The PortableServer::ServantLocator methods.
+ *
+ * Methods required by the PortableServer::ServantLocator
+ * interface.
+ */
+ //@{
+
+ /// Clients requests are forwarded via the
+ /// PortableServer::ForwardRequest exception thrown in this method.
+ virtual PortableServer::Servant preinvoke (
+ const PortableServer::ObjectId & oid,
+ PortableServer::POA_ptr adapter,
+ const char * operation,
+ PortableServer::ServantLocator::Cookie & the_cookie
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableServer::ForwardRequest));
+
+ /// This method is no-op in this ServantLocator implementation.
+ virtual void postinvoke (
+ const PortableServer::ObjectId &oid,
+ PortableServer::POA_ptr adapter,
+ const char * operation,
+ PortableServer::ServantLocator::Cookie the_cookie,
+ PortableServer::Servant the_servant
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ //@}
+
+private:
+
+ /// The load balancer/manager implementation.
+ TAO_LB_LoadManager * load_manager_;
+
+};
+
+#include "ace/post.h"
+
+#endif /* TAO_LB_MEMBER_LOCATOR_H */