Thread.sleep(50);
}
}
public static Options parseCommandLine(String[] args) {
CommandLine commandLine = new CommandLine(OPTION_DESCRIPTOR);
if (commandLine.parse(args)) {
boolean verbose = commandLine.hasOption("v");
String interactionClassName = commandLine.getOptionArgument("i", "interactionClass");
String portString = commandLine.getArgument("port");
int port = (portString == null) ? 8099 : Integer.parseInt(portString);
String statementTimeoutString = commandLine.getOptionArgument("s", "statementTimeout");
Integer statementTimeout = (statementTimeoutString == null) ? null : Integer.parseInt(statementTimeoutString);
boolean daemon = commandLine.hasOption("d");
return new Options(verbose, port, getInteractionClass(interactionClassName), daemon, statementTimeout);
}
return null;
}