| 413 | } |
| 414 | |
| 415 | private static Options createOptions() { |
| 416 | Options options = new Options(); |
| 417 | OptionBuilder.hasArg(); |
| 418 | OptionBuilder.withArgName("logging level"); |
| 419 | OptionBuilder |
| 420 | .withDescription("Select a logging level for the NutchServer: \n" |
| 421 | + "ALL|CONFIG|FINER|FINEST|INFO|OFF|SEVERE|WARNING"); |
| 422 | options.addOption(OptionBuilder.create(CMD_LOG_LEVEL)); |
| 423 | |
| 424 | OptionBuilder |
| 425 | .withDescription("Stop running NutchServer. " |
| 426 | + "true value forces the Server to stop despite running jobs e.g. kills the tasks "); |
| 427 | OptionBuilder.hasOptionalArg(); |
| 428 | OptionBuilder.withArgName("force"); |
| 429 | options.addOption(OptionBuilder.create(CMD_STOP)); |
| 430 | |
| 431 | OptionBuilder.withDescription("Show this help"); |
| 432 | options.addOption(OptionBuilder.create(CMD_HELP)); |
| 433 | |
| 434 | OptionBuilder.withDescription("Port to use for restful API."); |
| 435 | OptionBuilder.hasOptionalArg(); |
| 436 | OptionBuilder.withArgName("port number"); |
| 437 | options.addOption(OptionBuilder.create(CMD_PORT)); |
| 438 | return options; |
| 439 | } |
| 440 | |
| 441 | } |