summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-08-12 06:18:23 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-08-12 06:18:23 +0000
commitebdfdf717dc25260031ae22ffd1314f9be16d69b (patch)
treec9566dbf8ca7520f7c678fdf95e305425b38635e /TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
parentb05a85fdc953676e863ba676095efeb4c66a0bed (diff)
downloadATCD-ebdfdf717dc25260031ae22ffd1314f9be16d69b.tar.gz
ChangeLogTag:Sun Aug 11 23:17:47 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
new file mode 100644
index 00000000000..8330a43d452
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.h
@@ -0,0 +1,115 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file LB_IORInterceptor.h
+ *
+ * $Id$
+
+ * @author Ossama Othman <ossama@uci.edu>
+ */
+//=============================================================================
+
+#ifndef LB_IOR_INTERCEPTOR_H
+#define LB_IOR_INTERCEPTOR_H
+
+#include "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/PortableInterceptorC.h"
+#include "tao/LocalObject.h"
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+/**
+ * @class TAO_LB_IORInterceptor
+ *
+ * @brief TAO Load Balancer IOR interceptor.
+ *
+ * This IORInterceptor is registered in object group member ORBs.
+ * During creation of the object group member reference, this
+ * IORInterceptor will change the "current_factory" attribute of the
+ * PortableInterceptor::IORInfo object to the Load Balancer's
+ * ObjectReferenceFactory.
+ *
+ * @see LB_ObjectReferenceFactory.h for details.
+ */
+class TAO_LB_IORInterceptor
+ : public virtual PortableInterceptor::IORInterceptor,
+ public virtual TAO_Local_RefCounted_Object
+{
+public:
+
+ /// Constructor.
+ TAO_LB_IORInterceptor (const char * repository_ids);
+
+ /**
+ * @name Methods Required by the IOR 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 IOR interceptors.
+ */
+ //@{
+ /// Return the name of this IORInterceptor.
+ virtual char * name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Cleanup resources acquired by this IORInterceptor.
+ virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ /// Add the tagged components to the IOR.
+ virtual void establish_components (
+ PortableInterceptor::IORInfo_ptr info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC (());
+
+ virtual void components_established (
+ PortableInterceptor::IORInfo_ptr info
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual void adapter_manager_state_changed (
+ PortableInterceptor::AdapterManagerId id,
+ PortableInterceptor::AdapterState state
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ virtual void adapter_state_changed (
+ const PortableInterceptor::ObjectReferenceTemplateSeq & templates,
+ PortableInterceptor::AdapterState state
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ //@}
+
+private:
+
+ /// Space separated list of RepositoryIds corresponding to objects
+ /// that will be load balanced.
+ /**
+ * @note The actual storage for this string is controlled by the
+ * TAO_LB_ORBInitializer.
+ */
+ const char * repository_ids_;
+
+};
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#endif /* LB_IOR_INTERCEPTOR_H */