示例#1
0
 /**
  * Fills the command line options.
  *
  * @param options the options to fill
  */
 protected void fillOptions(final Options options) {
   // The name of the holding virtual machine
   final Option vmName =
       new Option(
           new Character(OPTION_TEMPLATE_NAME).toString(),
           "holdingVMName",
           true,
           "The name of the virtual machine within which one this RMNode is to be started.");
   vmName.setRequired(true);
   vmName.setArgName("name");
   options.addOption(vmName);
   super.fillOptions(options);
 }
示例#2
0
 protected void fillParameters(final CommandLine cl, final Options options) {
   try {
     // Holding vm's name
     if (cl.hasOption(OPTION_TEMPLATE_NAME)) {
       this.holdingVM = cl.getOptionValue(OPTION_TEMPLATE_NAME);
     } else {
       System.out.println(VIRMNodeStarter.ExitStatus.HOLDING_VM_NOT_SET.description);
       System.err.println(VIRMNodeStarter.ExitStatus.HOLDING_VM_NOT_SET.description);
       System.exit(VIRMNodeStarter.ExitStatus.HOLDING_VM_NOT_SET.exitCode);
     }
     super.fillParameters(cl, options);
   } catch (Exception e) {
     System.out.println(e.getMessage());
     e.printStackTrace();
     System.exit(RMNodeStarter.ExitStatus.FAILED_TO_LAUNCH.exitCode);
   }
 }