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/Freeze/phonebook/PhoneBookI.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/Freeze/phonebook/PhoneBookI.java')
-rw-r--r-- | java/demo/Freeze/phonebook/PhoneBookI.java | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/java/demo/Freeze/phonebook/PhoneBookI.java b/java/demo/Freeze/phonebook/PhoneBookI.java index a5e2205a4eb..ae91ab12882 100644 --- a/java/demo/Freeze/phonebook/PhoneBookI.java +++ b/java/demo/Freeze/phonebook/PhoneBookI.java @@ -13,75 +13,75 @@ class PhoneBookI extends _PhoneBookDisp { public ContactPrx createContact(Ice.Current current) - throws DatabaseException + throws DatabaseException { - // - // Generate a new unique identity. - // - Ice.Identity ident = new Ice.Identity(); - ident.name = Ice.Util.generateUUID(); - ident.category = "contact"; + // + // Generate a new unique identity. + // + Ice.Identity ident = new Ice.Identity(); + ident.name = Ice.Util.generateUUID(); + ident.category = "contact"; - // - // Create a new Contact Servant. - // - ContactI contact = new ContactI(_contactFactory); + // + // Create a new Contact Servant. + // + ContactI contact = new ContactI(_contactFactory); - // - // Create a new Ice Object in the evictor, using the new - // identity and the new Servant. - // - _evictor.add(contact, ident); + // + // Create a new Ice Object in the evictor, using the new + // identity and the new Servant. + // + _evictor.add(contact, ident); - return ContactPrxHelper.uncheckedCast(current.adapter.createProxy(ident)); + return ContactPrxHelper.uncheckedCast(current.adapter.createProxy(ident)); } public ContactPrx[] findContacts(String name, Ice.Current current) - throws DatabaseException + throws DatabaseException { - try - { - Ice.Identity[] identities = _index.find(name); + try + { + Ice.Identity[] identities = _index.find(name); - ContactPrx[] contacts = new ContactPrx[identities.length]; - for(int i = 0; i < identities.length; ++i) - { - contacts[i] = ContactPrxHelper.uncheckedCast - (current.adapter.createProxy(identities[i])); - } - return contacts; - } - catch(Freeze.DatabaseException ex) - { - DatabaseException e = new DatabaseException(); - e.message = ex.message; - throw e; - } + ContactPrx[] contacts = new ContactPrx[identities.length]; + for(int i = 0; i < identities.length; ++i) + { + contacts[i] = ContactPrxHelper.uncheckedCast + (current.adapter.createProxy(identities[i])); + } + return contacts; + } + catch(Freeze.DatabaseException ex) + { + DatabaseException e = new DatabaseException(); + e.message = ex.message; + throw e; + } } public void setEvictorSize(int size, Ice.Current current) - throws DatabaseException + throws DatabaseException { - // - // No synchronization necessary, _evictor is immutable. - // - _evictor.setSize(size); + // + // No synchronization necessary, _evictor is immutable. + // + _evictor.setSize(size); } public void shutdown(Ice.Current current) { - current.adapter.getCommunicator().shutdown(); + current.adapter.getCommunicator().shutdown(); } PhoneBookI(Freeze.Evictor evictor, ContactFactory contactFactory, - NameIndex index) + NameIndex index) { - _evictor = evictor; - _contactFactory = contactFactory; - _index = index; + _evictor = evictor; + _contactFactory = contactFactory; + _index = index; } private Freeze.Evictor _evictor; |