summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AdminI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/AdminI.cpp')
-rw-r--r--cpp/src/IceGrid/AdminI.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp
index 9f7733b06c5..b6ef3371509 100644
--- a/cpp/src/IceGrid/AdminI.cpp
+++ b/cpp/src/IceGrid/AdminI.cpp
@@ -403,7 +403,7 @@ AdminI::getServerAdminCategory(const Current&) const
return _registry->getServerAdminCategory();
}
-Ice::ObjectPrx
+ObjectPrx
AdminI::getServerAdmin(const string& id, const Current& current) const
{
ServerProxyWrapper proxy(_database, id); // Ensure that the server exists and loaded on the node.
@@ -774,6 +774,20 @@ AdminI::getNodeInfo(const string& name, const Ice::Current&) const
return toNodeInfo(_database->getNode(name)->getInfo());
}
+ObjectPrx
+AdminI::getNodeAdmin(const string& name, const Current& current) const
+{
+ //
+ // Check if the node exists
+ //
+ _database->getNode(name);
+
+ Ice::Identity adminId;
+ adminId.name = name;
+ adminId.category = _registry->getNodeAdminCategory();
+ return current.adapter->createProxy(adminId);
+}
+
bool
AdminI::pingNode(const string& name, const Current&) const
{
@@ -900,6 +914,23 @@ AdminI::getRegistryInfo(const string& name, const Ice::Current&) const
}
}
+ObjectPrx
+AdminI::getRegistryAdmin(const string& name, const Current& current) const
+{
+ if(name != _registry->getName())
+ {
+ //
+ // Check if the replica exists
+ //
+ _database->getReplica(name);
+ }
+
+ Identity adminId;
+ adminId.name = name;
+ adminId.category = _registry->getReplicaAdminCategory();
+ return current.adapter->createProxy(adminId);
+}
+
bool
AdminI::pingRegistry(const string& name, const Current&) const
{