summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/WellKnownObjectsManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/WellKnownObjectsManager.h')
-rw-r--r--cpp/src/IceGrid/WellKnownObjectsManager.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/WellKnownObjectsManager.h b/cpp/src/IceGrid/WellKnownObjectsManager.h
new file mode 100644
index 00000000000..b17a077e0b5
--- /dev/null
+++ b/cpp/src/IceGrid/WellKnownObjectsManager.h
@@ -0,0 +1,55 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef ICE_GRID_WELL_KNOWN_OBJECTS_MANAGER_H
+#define ICE_GRID_WELL_KNOWN_OBJECTS_MANAGER_H
+
+#include <IceGrid/Internal.h>
+
+namespace IceGrid
+{
+
+class Database;
+typedef IceUtil::Handle<Database> DatabasePtr;
+
+class WellKnownObjectsManager : public IceUtil::Mutex, public IceUtil::Shared
+{
+public:
+
+ WellKnownObjectsManager(const DatabasePtr&);
+
+ void add(const Ice::ObjectPrx&, const std::string&);
+ void addEndpoint(const std::string&, const Ice::ObjectPrx&);
+ void finish();
+
+ void registerAll();
+ void registerAll(const ReplicaSessionPrx&);
+
+ void registerWellKnownObjects(const ObjectInfoSeq&);
+ void unregisterWellKnownObjects(const ObjectInfoSeq&);
+
+ void updateReplicatedWellKnownObjects();
+
+ Ice::ObjectPrx getEndpoints(const std::string&);
+
+private:
+
+ bool initialized() const;
+
+ const DatabasePtr _database;
+ bool _initialized;
+
+ StringObjectProxyDict _endpoints;
+ ObjectInfoSeq _wellKnownObjects;
+};
+typedef IceUtil::Handle<WellKnownObjectsManager> WellKnownObjectsManagerPtr;
+
+};
+
+#endif