in hawtio-embedded/src/main/java/io/hawt/embedded/Options.java [102:182]
public void init() {
addOption(new Option("h", "help", "Displays the help screen") {
protected void doProcess(String arg, LinkedList<String> remainingArgs) {
help = true;
}
});
addOption(new ParameterOption("j", "join", "Join server thread") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
jointServerThread = Boolean.valueOf(parameter);
}
});
addOption(new ParameterOption("w", "war", "War file or directory of the hawtio web application") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
war = parameter;
}
});
addOption(new ParameterOption("l", "warLocation", "Directory to search for .war files") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
warLocation = parameter;
}
});
addOption(new ParameterOption("pd", "pluginsDir", "Directory to search for .war files to install as 3rd party plugins") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
plugins = parameter;
}
});
addOption(new ParameterOption("c", "contextPath", "Context path") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
// must have leading slash
if (!parameter.startsWith("/")) {
contextPath = "/" + parameter;
} else {
contextPath = parameter;
}
}
});
addOption(new ParameterOption("hst", "host", "Hostname to listen to") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
host = parameter;
}
});
addOption(new ParameterOption("p", "port", "Port number") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
try {
port = Integer.parseInt(parameter);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid port number " + parameter + " due " + e.getMessage());
}
}
});
addOption(new ParameterOption("ecp", "extraClassPath", "Extra classpath") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
extraClassPath = parameter;
}
});
addOption(new ParameterOption("ou", "openUrl", "Open the web console automatic in the web browser") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
openUrl = Boolean.valueOf(parameter);
}
});
addOption(new ParameterOption("ks", "keyStore", "JKS keyStore with the keys for https") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
keyStore = parameter;
}
});
addOption(new ParameterOption("kp", "keyStorePass", "password for the JKS keyStore with the keys for https") {
protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
keyStorePass = parameter;
}
});
}