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/library/Server.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/library/Server.java')
-rw-r--r-- | java/demo/Freeze/library/Server.java | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/java/demo/Freeze/library/Server.java b/java/demo/Freeze/library/Server.java index 2ce57e21a78..cc94c02d2f9 100644 --- a/java/demo/Freeze/library/Server.java +++ b/java/demo/Freeze/library/Server.java @@ -12,53 +12,53 @@ class LibraryServer extends Ice.Application public int run(String[] args) { - Ice.Properties properties = communicator().getProperties(); + Ice.Properties properties = communicator().getProperties(); - // - // Create an object adapter - // - Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Library"); + // + // Create an object adapter + // + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Library"); - // - // Create an evictor for books. - // - Freeze.Evictor evictor = Freeze.Util.createEvictor(adapter, _envName, "books", null, null, true); - int evictorSize = properties.getPropertyAsInt("Library.EvictorSize"); - if(evictorSize > 0) - { - evictor.setSize(evictorSize); - } + // + // Create an evictor for books. + // + Freeze.Evictor evictor = Freeze.Util.createEvictor(adapter, _envName, "books", null, null, true); + int evictorSize = properties.getPropertyAsInt("Library.EvictorSize"); + if(evictorSize > 0) + { + evictor.setSize(evictorSize); + } - adapter.addServantLocator(evictor, "book"); + adapter.addServantLocator(evictor, "book"); - // - // Create the library, and add it to the object adapter. - // - LibraryI library = new LibraryI(communicator(), _envName, "authors", evictor); - adapter.add(library, communicator().stringToIdentity("library")); + // + // Create the library, and add it to the object adapter. + // + LibraryI library = new LibraryI(communicator(), _envName, "authors", evictor); + adapter.add(library, communicator().stringToIdentity("library")); - // - // Create and install a factory for books. - // - Ice.ObjectFactory bookFactory = new BookFactory(library); - communicator().addObjectFactory(bookFactory, "::Demo::Book"); + // + // Create and install a factory for books. + // + Ice.ObjectFactory bookFactory = new BookFactory(library); + communicator().addObjectFactory(bookFactory, "::Demo::Book"); - // - // Everything ok, let's go. - // - adapter.activate(); + // + // Everything ok, let's go. + // + adapter.activate(); - shutdownOnInterrupt(); - communicator().waitForShutdown(); - defaultInterrupt(); + shutdownOnInterrupt(); + communicator().waitForShutdown(); + defaultInterrupt(); - library.close(); - return 0; + library.close(); + return 0; } LibraryServer(String envName) { - _envName = envName; + _envName = envName; } private String _envName; @@ -69,7 +69,7 @@ public class Server static public void main(String[] args) { - LibraryServer app = new LibraryServer("db"); - app.main("demo.Freeze.library.Server", args, "config.server"); + LibraryServer app = new LibraryServer("db"); + app.main("demo.Freeze.library.Server", args, "config.server"); } } |