summaryrefslogtreecommitdiff
path: root/java/test/Ice/metrics/ConnectionObserverI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/Ice/metrics/ConnectionObserverI.java')
-rw-r--r--java/test/Ice/metrics/ConnectionObserverI.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/java/test/Ice/metrics/ConnectionObserverI.java b/java/test/Ice/metrics/ConnectionObserverI.java
new file mode 100644
index 00000000000..721d527d748
--- /dev/null
+++ b/java/test/Ice/metrics/ConnectionObserverI.java
@@ -0,0 +1,37 @@
+// **********************************************************************
+//
+// 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 ConnectionObserverI extends ObserverI implements Ice.Instrumentation.ConnectionObserver
+{
+ public synchronized void
+ reset()
+ {
+ super.reset();
+ received = 0;
+ sent = 0;
+ }
+
+ public synchronized void
+ sentBytes(int s)
+ {
+ sent += s;
+ }
+
+ public synchronized void
+ receivedBytes(int s)
+ {
+ received += s;
+ }
+
+ int sent;
+ int received;
+};
+