summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/WellKnownObjectsManager.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-09-04 19:39:59 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-09-04 19:39:59 +0000
commit1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268 (patch)
treecd87f8121980159fdafd6b01e6802ea594478b93 /cpp/src/IceGrid/WellKnownObjectsManager.h
parenticegridadmin always uses routed config if possible. added error messages if (diff)
downloadice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.tar.bz2
ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.tar.xz
ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.zip
Improved observers, refactored topic manager and initialization Added
icegridadmin commands to examine the registries
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