summaryrefslogtreecommitdiff
path: root/java/demo/Ice/bidir/CallbackSenderI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo/Ice/bidir/CallbackSenderI.java')
-rwxr-xr-xjava/demo/Ice/bidir/CallbackSenderI.java72
1 files changed, 36 insertions, 36 deletions
diff --git a/java/demo/Ice/bidir/CallbackSenderI.java b/java/demo/Ice/bidir/CallbackSenderI.java
index 71a8745f900..05805692ca7 100755
--- a/java/demo/Ice/bidir/CallbackSenderI.java
+++ b/java/demo/Ice/bidir/CallbackSenderI.java
@@ -19,56 +19,56 @@ class CallbackSenderI extends _CallbackSenderDisp implements java.lang.Runnable
synchronized public void
destroy()
{
- System.out.println("destroying callback sender");
- _destroy = true;
+ System.out.println("destroying callback sender");
+ _destroy = true;
- this.notify();
+ this.notify();
}
synchronized public void
addClient(Ice.Identity ident, Ice.Current current)
{
- System.out.println("adding client `" + _communicator.identityToString(ident) + "'");
+ System.out.println("adding client `" + _communicator.identityToString(ident) + "'");
- Ice.ObjectPrx base = current.con.createProxy(ident);
- CallbackReceiverPrx client = CallbackReceiverPrxHelper.uncheckedCast(base);
- _clients.addElement(client);
+ Ice.ObjectPrx base = current.con.createProxy(ident);
+ CallbackReceiverPrx client = CallbackReceiverPrxHelper.uncheckedCast(base);
+ _clients.addElement(client);
}
synchronized public void
run()
{
- while(!_destroy)
- {
- try
- {
- this.wait(2000);
- }
- catch(java.lang.InterruptedException ex)
- {
- }
+ while(!_destroy)
+ {
+ try
+ {
+ this.wait(2000);
+ }
+ catch(java.lang.InterruptedException ex)
+ {
+ }
- if(!_destroy && !_clients.isEmpty())
- {
- ++_num;
+ if(!_destroy && !_clients.isEmpty())
+ {
+ ++_num;
- java.util.Iterator p = _clients.iterator();
- while(p.hasNext())
- {
- CallbackReceiverPrx r = (CallbackReceiverPrx)p.next();
- try
- {
- r.callback(_num);
- }
- catch(Exception ex)
- {
- System.out.println("removing client `" + _communicator.identityToString(r.ice_getIdentity()) + "':");
- ex.printStackTrace();
- p.remove();
- }
- }
- }
- }
+ java.util.Iterator p = _clients.iterator();
+ while(p.hasNext())
+ {
+ CallbackReceiverPrx r = (CallbackReceiverPrx)p.next();
+ try
+ {
+ r.callback(_num);
+ }
+ catch(Exception ex)
+ {
+ System.out.println("removing client `" + _communicator.identityToString(r.ice_getIdentity()) + "':");
+ ex.printStackTrace();
+ p.remove();
+ }
+ }
+ }
+ }
}
private Ice.Communicator _communicator;