Class Cli


  • public class Cli
    extends Object
    The command-line runner for Dropwizard application.
    • Constructor Detail

      • Cli

        public Cli​(JarLocation location,
                   Bootstrap<?> bootstrap,
                   OutputStream stdOut,
                   OutputStream stdErr)
        Create a new CLI interface for a application and its bootstrapped environment.
        Parameters:
        location - the location of the application
        bootstrap - the bootstrap for the application
        stdOut - standard out
        stdErr - standard err
    • Method Detail

      • run

        public Optional<Throwable> run​(String... arguments)
        Runs the command line interface given some arguments.
        Parameters:
        arguments - the command line arguments
        Returns:
        the error or an empty optional if command succeeded