logreader/src/main/java/io/hoplin/logreader/cli/CliHandler.java
/**
   * Handle invocation of the commands
   *
   * @param options
   * @param env
   * @param handlers the handlers that can be used to handlePan this {@link OptionSet}
   * @throws IllegalStateException if the {@link Environment} was required for a handler but not
   *                               present
   */
Handle invocation of the commands
@param options
@param env
@param handlers the handlers that can be used to handlePan this  OptionSet
@throws IllegalStateException if the  Environment was required for a handler but not
present
Handle invocation of the commands @param options @param env @param handlers the handlers that can be used to handlePan this OptionSet @throws IllegalStateException if the Environment was required for a handler but not present
static void handle(final OptionSet options, final Environment env,
      final List<CliHandler> handlers) {
    for (final CliHandler handler : handlers) {
      if (handler.canHandle(options)) {
        if (handler.requiresEnvironment() && !env.isAvailable()) {
          throw new IllegalStateException(
              "Handler requires environment but none is available" + handler);
        }
        if (!handler.handle(env, options)) {
          LogHolder.LOGGER.info("Exit requested after handler : {},", handler);
          break;
        }
      }
    }
  }
static void handle ( final OptionSet options , final Environment env , final List < CliHandler > handlers ) { for ( final CliHandler handler : handlers ) { if ( handler . canHandle ( options ) ) { if ( handler . requiresEnvironment ( ) && ! env . isAvailable ( ) ) { throw new IllegalStateException ( "Handler requires environment but none is available" + handler ) ; } if ( ! handler . handle ( env , options ) ) { LogHolder . LOGGER . info ( "Exit requested after handler : {}," , handler ) ; break ; } } } }
Handle invocation of the commands
 @param options
 @param env
 @param handlers the handlers that can be used to handlePan this {@link OptionSet}
 @throws IllegalStateException if the {@link Environment} was required for a handler but not
                               present
Handle invocation of the commands @param options @param env @param handlers the handlers that can be used to handlePan this { @link OptionSet } @throws IllegalStateException if the { @link Environment } was required for a handler but not present