* @throws IOException
*/
public static void main(String[] args)
throws DocumentListException, IOException, ServiceException,
InterruptedException {
SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
String authSub = parser.getValue("authSub", "auth", "a");
String user = parser.getValue("username", "user", "u");
String password = parser.getValue("password", "pass", "p");
String host = parser.getValue("host", "s");
boolean help = parser.containsKey("help", "h");
if (host == null) {
host = DocumentList.DEFAULT_HOST;
}
if (help || (user == null || password == null) && authSub == null) {
printMessage(USAGE_MESSAGE);
System.exit(1);
}
if (parser.containsKey("log", "l")) {
turnOnLogging();
}
DocumentListDemo demo = new DocumentListDemo(System.out, APPLICATION_NAME,
host);