vertx/src/main/java/eu/internetofus/common/vertx/AbstractMain.java
/**
   * Start the server with the specified arguments.
   *
   * @param args arguments to configure the main process.
   *
   * @return the component that will called when the server has started or not.
   */
Start the server with the specified arguments.
@param args arguments to configure the main process.

@return the component that will called when the server has started or not.
Start the server with the specified arguments . @param args arguments to configure the main process . @return the component that will called when the server has started or not .
public Future<WeNetModuleContext> startWith(final String... args) {
    this.startLoggingSystems();
    try {
      Logger.debug("Start Main with: {}", () -> Arrays.toString(args));
      final CommandLineParser parser = new DefaultParser();
      final var options = this.createOptions();
      final var cmd = parser.parse(options, args);
      if (cmd.hasOption(CONF_DIR_OPTION)) {
        final var confDirValue = cmd.getOptionValue(CONF_DIR_OPTION);
        this.configureWithFilesAt(confDirValue);
      }
      if (cmd.hasOption(PROPERTY_OPTION)) {
        final var properties = cmd.getOptionProperties(PROPERTY_OPTION);
        this.configureWithPropetyValues(properties);
      }
      if (cmd.hasOption(HELP_OPTION)) {
        this.printHelpMessage(options);
        return Future.succeededFuture();
      } else if (cmd.hasOption(VERSION_OPTION)) {
        this.printVersion();
        return Future.succeededFuture();
      } else {
        return this.startVertx();
      }
    } catch (final Throwable throwable) {
      InternalLogger.log(Level.ERROR, throwable.getLocalizedMessage());
      InternalLogger.log(Level.INFO, "Call with -h to obtain help information");
      return Future.failedFuture(throwable);
    }
  }
public Future < WeNetModuleContext > startWith ( final String ... args ) { this . startLoggingSystems ( ) ; try { Logger . debug ( "Start Main with: {}" , ( ) -> Arrays . toString ( args ) ) ; final CommandLineParser parser = new DefaultParser ( ) ; final var options = this . createOptions ( ) ; final var cmd = parser . parse ( options , args ) ; if ( cmd . hasOption ( CONF_DIR_OPTION ) ) { final var confDirValue = cmd . getOptionValue ( CONF_DIR_OPTION ) ; this . configureWithFilesAt ( confDirValue ) ; } if ( cmd . hasOption ( PROPERTY_OPTION ) ) { final var properties = cmd . getOptionProperties ( PROPERTY_OPTION ) ; this . configureWithPropetyValues ( properties ) ; } if ( cmd . hasOption ( HELP_OPTION ) ) { this . printHelpMessage ( options ) ; return Future . succeededFuture ( ) ; } else if ( cmd . hasOption ( VERSION_OPTION ) ) { this . printVersion ( ) ; return Future . succeededFuture ( ) ; } else { return this . startVertx ( ) ; } } catch ( final Throwable throwable ) { InternalLogger . log ( Level . ERROR , throwable . getLocalizedMessage ( ) ) ; InternalLogger . log ( Level . INFO , "Call with -h to obtain help information" ) ; return Future . failedFuture ( throwable ) ; } }
Start the server with the specified arguments.
Start the server with the specified arguments .