summaryrefslogtreecommitdiff
path: root/java/test/Ice/metrics/InvocationObserverI.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-09-09 19:12:28 +0200
committerBenoit Foucher <benoit@zeroc.com>2013-09-09 19:12:28 +0200
commit8a0d1c7e34d8bd18bd85666cce94403a5158975c (patch)
tree36050a818282c0a92ee88a6ef28354e186c5aebe /java/test/Ice/metrics/InvocationObserverI.java
parentTest scripts improvements (diff)
downloadice-8a0d1c7e34d8bd18bd85666cce94403a5158975c.tar.bz2
ice-8a0d1c7e34d8bd18bd85666cce94403a5158975c.tar.xz
ice-8a0d1c7e34d8bd18bd85666cce94403a5158975c.zip
Fixed ICE-5196: allow setting an observer with IceMX enabled
Diffstat (limited to 'java/test/Ice/metrics/InvocationObserverI.java')
-rw-r--r--java/test/Ice/metrics/InvocationObserverI.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/java/test/Ice/metrics/InvocationObserverI.java b/java/test/Ice/metrics/InvocationObserverI.java
new file mode 100644
index 00000000000..447ea094c5b
--- /dev/null
+++ b/java/test/Ice/metrics/InvocationObserverI.java
@@ -0,0 +1,53 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2013 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.
+//
+// **********************************************************************
+
+package test.Ice.metrics;
+
+class InvocationObserverI extends ObserverI implements Ice.Instrumentation.InvocationObserver
+{
+ public synchronized void
+ reset()
+ {
+ super.reset();
+ retriedCount = 0;
+ userExceptionCount = 0;
+ if(remoteObserver != null)
+ {
+ remoteObserver.reset();
+ }
+ }
+
+ public synchronized void
+ retried()
+ {
+ ++retriedCount;
+ }
+
+ public synchronized void
+ userException()
+ {
+ ++userExceptionCount;
+ }
+
+ public synchronized Ice.Instrumentation.RemoteObserver
+ getRemoteObserver(Ice.ConnectionInfo c, Ice.Endpoint e, int a, int b)
+ {
+ if(remoteObserver == null)
+ {
+ remoteObserver = new RemoteObserverI();
+ remoteObserver.reset();
+ }
+ return remoteObserver;
+ }
+
+ int userExceptionCount;
+ int retriedCount;
+
+ RemoteObserverI remoteObserver = null;
+};