Class Cli

java.lang.Object
io.dropwizard.core.cli.Cli

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

    • Cli

      public Cli(io.dropwizard.util.JarLocation location, Bootstrap<?> bootstrap, OutputStream stdOut, OutputStream stdErr)
      Create a new CLI interface for an 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 Details

    • 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
    • getStdOut

      public PrintWriter getStdOut()
    • getStdErr

      public PrintWriter getStdErr()