ICE 3.4.2
[php5-ice-freebsdport.git] / java / demo / Database / library / Client.java
blob1f1f7a64a57a76d68d7773c199cdd88d54d223c0
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 public class Client extends Ice.Application
12 class ShutdownHook extends Thread
14 public void
15 run()
17 try
19 communicator().destroy();
21 catch(Ice.LocalException ex)
23 ex.printStackTrace();
28 public int
29 run(String[] args)
31 if(args.length > 1)
33 System.err.println("Usage: " + appName() + " [file]");
34 return 1;
38 // Since this is an interactive demo we want to clear the
39 // Application installed interrupt callback and install our
40 // own shutdown hook.
42 setInterruptHook(new ShutdownHook());
44 return RunParser.runParser(appName(), args, communicator());
47 static public void
48 main(String[] args)
50 Client app = new Client();
51 int status = app.main("demo.Database.library.Client", args, "config.client");
52 System.exit(status);