summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/metrics/TestI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-09-13 15:33:46 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-09-13 15:33:46 +0200
commit0ed3e3fff565b80f84ec7e23d821fd30fac89b86 (patch)
treec9f4157f23727413b34d33f12f67e891879d3a77 /cpp/test/Ice/metrics/TestI.cpp
parentMerge remote-tracking branch 'origin/mx' into mx (diff)
downloadice-0ed3e3fff565b80f84ec7e23d821fd30fac89b86.tar.bz2
ice-0ed3e3fff565b80f84ec7e23d821fd30fac89b86.tar.xz
ice-0ed3e3fff565b80f84ec7e23d821fd30fac89b86.zip
Added Ice/metrics test
Diffstat (limited to 'cpp/test/Ice/metrics/TestI.cpp')
-rw-r--r--cpp/test/Ice/metrics/TestI.cpp80
1 files changed, 80 insertions, 0 deletions
diff --git a/cpp/test/Ice/metrics/TestI.cpp b/cpp/test/Ice/metrics/TestI.cpp
new file mode 100644
index 00000000000..52384c3736c
--- /dev/null
+++ b/cpp/test/Ice/metrics/TestI.cpp
@@ -0,0 +1,80 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2012 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.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+void
+MetricsI::op(const Ice::Current&)
+{
+}
+
+void
+MetricsI::fail(const Ice::Current& current)
+{
+ current.con->close(true);
+}
+
+void
+MetricsI::opWithUserException(const Ice::Current&)
+{
+ throw Test::UserEx();
+}
+
+void
+MetricsI::opWithRequestFailedException(const Ice::Current&)
+{
+ throw Ice::ObjectNotExistException(__FILE__, __LINE__);
+}
+
+void
+MetricsI::opWithLocalException(const Ice::Current&)
+{
+ throw Ice::SyscallException(__FILE__, __LINE__);
+}
+
+void
+MetricsI::opWithUnknownException(const Ice::Current&)
+{
+ throw "TEST";
+}
+
+void
+MetricsI::opByteS(const Test::ByteSeq& bs, const Ice::Current&)
+{
+}
+
+Ice::ObjectPrx
+MetricsI::getAdmin(const Ice::Current& current)
+{
+ return current.adapter->getCommunicator()->getAdmin();
+}
+
+void
+MetricsI::shutdown(const Ice::Current& current)
+{
+ current.adapter->getCommunicator()->shutdown();
+}
+
+ControllerI::ControllerI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter)
+{
+}
+
+void
+ControllerI::hold(const Ice::Current&)
+{
+ _adapter->hold();
+ _adapter->waitForHold();
+}
+
+void
+ControllerI::resume(const Ice::Current&)
+{
+ _adapter->activate();
+}