diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /java/demo/Ice/session/SessionI.java | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'java/demo/Ice/session/SessionI.java')
-rw-r--r-- | java/demo/Ice/session/SessionI.java | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/java/demo/Ice/session/SessionI.java b/java/demo/Ice/session/SessionI.java index bca977d64ee..8ef6ed3534a 100644 --- a/java/demo/Ice/session/SessionI.java +++ b/java/demo/Ice/session/SessionI.java @@ -14,78 +14,78 @@ class SessionI extends _SessionDisp public SessionI(String name) { - _name = name; - _timestamp = System.currentTimeMillis(); - System.out.println("The session " + _name + " is now created."); + _name = name; + _timestamp = System.currentTimeMillis(); + System.out.println("The session " + _name + " is now created."); } synchronized public HelloPrx createHello(Ice.Current c) { - if(_destroy) - { - throw new Ice.ObjectNotExistException(); - } - HelloPrx hello = HelloPrxHelper.uncheckedCast(c.adapter.addWithUUID(new HelloI(_name, _nextId++))); - _objs.add(hello); - return hello; + if(_destroy) + { + throw new Ice.ObjectNotExistException(); + } + HelloPrx hello = HelloPrxHelper.uncheckedCast(c.adapter.addWithUUID(new HelloI(_name, _nextId++))); + _objs.add(hello); + return hello; } synchronized public void refresh(Ice.Current c) { - if(_destroy) - { - throw new Ice.ObjectNotExistException(); - } - _timestamp = System.currentTimeMillis(); + if(_destroy) + { + throw new Ice.ObjectNotExistException(); + } + _timestamp = System.currentTimeMillis(); } synchronized public String getName(Ice.Current c) { - if(_destroy) - { - throw new Ice.ObjectNotExistException(); - } - return _name; + if(_destroy) + { + throw new Ice.ObjectNotExistException(); + } + return _name; } synchronized public void destroy(Ice.Current c) { - if(_destroy) - { - throw new Ice.ObjectNotExistException(); - } + if(_destroy) + { + throw new Ice.ObjectNotExistException(); + } - _destroy = true; - System.out.println("The session " + _name + " is now destroyed."); - try - { - c.adapter.remove(c.id); - java.util.Iterator p = _objs.iterator(); - while(p.hasNext()) - { - c.adapter.remove(((HelloPrx)p.next()).ice_getIdentity()); - } - } - catch(Ice.ObjectAdapterDeactivatedException e) - { - // This method is called on shutdown of the server, in - // which case this exception is expected. - } - _objs.clear(); + _destroy = true; + System.out.println("The session " + _name + " is now destroyed."); + try + { + c.adapter.remove(c.id); + java.util.Iterator p = _objs.iterator(); + while(p.hasNext()) + { + c.adapter.remove(((HelloPrx)p.next()).ice_getIdentity()); + } + } + catch(Ice.ObjectAdapterDeactivatedException e) + { + // This method is called on shutdown of the server, in + // which case this exception is expected. + } + _objs.clear(); } synchronized public long timestamp() { - if(_destroy) - { - throw new Ice.ObjectNotExistException(); - } - return _timestamp; + if(_destroy) + { + throw new Ice.ObjectNotExistException(); + } + return _timestamp; } private String _name; |