summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerCache.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-11-21 17:58:52 -0500
committerBernard Normier <bernard@zeroc.com>2007-11-21 17:58:52 -0500
commit7826d8dd30b3bbbd3be4c65df8260164a9021798 (patch)
tree415bad61d47d08332f3ea6a377dc95b6dea467f9 /cpp/src/IceGrid/ServerCache.cpp
parentAdded AMI call (diff)
downloadice-7826d8dd30b3bbbd3be4c65df8260164a9021798.tar.bz2
ice-7826d8dd30b3bbbd3be4c65df8260164a9021798.tar.xz
ice-7826d8dd30b3bbbd3be4c65df8260164a9021798.zip
Refactored server-properties access/retrieval from IceGrid admin client
Diffstat (limited to 'cpp/src/IceGrid/ServerCache.cpp')
-rw-r--r--cpp/src/IceGrid/ServerCache.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp
index fefd0ed7ebe..90a1428c078 100644
--- a/cpp/src/IceGrid/ServerCache.cpp
+++ b/cpp/src/IceGrid/ServerCache.cpp
@@ -61,11 +61,13 @@ namespace IceGrid
}
ServerCache::ServerCache(const Ice::CommunicatorPtr& communicator,
+ const string& instanceName,
NodeCache& nodeCache,
AdapterCache& adapterCache,
ObjectCache& objectCache,
AllocatableObjectCache& allocatableObjectCache) :
_communicator(communicator),
+ _instanceName(instanceName),
_nodeCache(nodeCache),
_adapterCache(adapterCache),
_objectCache(objectCache),
@@ -409,6 +411,26 @@ ServerEntry::getProxy(int& activationTimeout, int& deactivationTimeout, string&
}
}
+Ice::ObjectPrx
+ServerEntry::getAdminProxy()
+{
+ //
+ // The category must match the server admin category used by nodes
+ //
+ Ice::Identity adminId = {_id, _cache.getInstanceName() + "-NodeRouter" };
+
+ // TODO: what's this upToDate parameter about??
+
+ try
+ {
+ return getProxy(true)->ice_identity(adminId);
+ }
+ catch(const ServerNotExistException&)
+ {
+ return 0;
+ }
+}
+
AdapterPrx
ServerEntry::getAdapter(const string& id, bool upToDate)
{