summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/AdminI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePack/AdminI.cpp')
-rw-r--r--cpp/src/IcePack/AdminI.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/cpp/src/IcePack/AdminI.cpp b/cpp/src/IcePack/AdminI.cpp
index f09b89c5f96..8b592d22bb7 100644
--- a/cpp/src/IcePack/AdminI.cpp
+++ b/cpp/src/IcePack/AdminI.cpp
@@ -168,6 +168,42 @@ IcePack::AdminI::getAllServerNames(const Current&) const
return _serverRegistry->getAll();
}
+ServerActivation
+IcePack::AdminI::getServerActivation(const ::std::string& name, const Ice::Current&) const
+{
+ ServerPrx server = _serverRegistry->findByName(name);
+ try
+ {
+ return server->getActivationMode();
+ }
+ catch(const Ice::ObjectNotExistException&)
+ {
+ throw ServerNotExistException();
+ }
+ catch(const Ice::LocalException&)
+ {
+ throw NodeUnreachableException();
+ }
+}
+
+void
+IcePack::AdminI::setServerActivation(const ::std::string& name, ServerActivation mode, const Ice::Current&)
+{
+ ServerPrx server = _serverRegistry->findByName(name);
+ try
+ {
+ return server->setActivationMode(mode);
+ }
+ catch(const Ice::ObjectNotExistException&)
+ {
+ throw ServerNotExistException();
+ }
+ catch(const Ice::LocalException&)
+ {
+ throw NodeUnreachableException();
+ }
+}
+
string
IcePack::AdminI::getAdapterEndpoints(const string& name, const Current&) const
{