System.out.println(" --agent-port-no <port-no> Plan Agent Port No");
}
private boolean parseArguments(String args[])
{
CommandLineParser cmdLnParser = new BasicParser();
CommandLine cmdLn = null;
Options optArgs = new Options();
Option cmdLineArg1 =
new Option("exeID", "PLAN Execution ID (required)");
cmdLineArg1.setRequired(true);
cmdLineArg1.setArgs(1);
cmdLineArg1.setArgName("plan-execution-id");
Option cmdLineArg2 =
new Option("nodeID", "Executed Node ID (required)");
cmdLineArg2.setRequired(true);
cmdLineArg2.setArgs(1);
cmdLineArg2.setArgName("executed-node-id");
Option cmdLineArg3 =
new Option("portNo", "PLAN Master listener port no (required)");
cmdLineArg3.setRequired(true);
cmdLineArg3.setArgs(1);
cmdLineArg3.setArgName("port-no");
Option cmdLineArg4 =
new Option("agentPortNo", "PLAN Agent Port No (required)");
cmdLineArg4.setRequired(true);
cmdLineArg4.setArgs(1);
cmdLineArg4.setArgName("agent-port-no");
optArgs.addOption(cmdLineArg1);
optArgs.addOption(cmdLineArg2);
optArgs.addOption(cmdLineArg3);
optArgs.addOption(cmdLineArg4);
//parse the arguments
try
{
cmdLn = cmdLnParser.parse(optArgs, args);
}
catch (ParseException pe)
{
logger.error("Can not parse arguments: " + pe.getMessage());
HelpFormatter formatter = new HelpFormatter();