diff options
Diffstat (limited to 'java/test/Ice/ami/TestI.java')
-rw-r--r-- | java/test/Ice/ami/TestI.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/java/test/Ice/ami/TestI.java b/java/test/Ice/ami/TestI.java index c737e85ea39..2f448acd89c 100644 --- a/java/test/Ice/ami/TestI.java +++ b/java/test/Ice/ami/TestI.java @@ -41,9 +41,42 @@ public class TestI extends _TestIntfDisp { } + public synchronized void + opBatch(Ice.Current current) + { + ++_batchCount; + notify(); + } + + public synchronized int + opBatchCount(Ice.Current current) + { + return _batchCount; + } + + public synchronized boolean + waitForBatch(int count, Ice.Current current) + { + while(_batchCount < count) + { + try + { + wait(5000); + } + catch(InterruptedException ex) + { + } + } + boolean result = count == _batchCount; + _batchCount = 0; + return result; + } + public void shutdown(Ice.Current current) { current.adapter.getCommunicator().shutdown(); } + + private int _batchCount; } |