Package io.dropwizard.cli
Class Cli
- java.lang.Object
-
- io.dropwizard.cli.Cli
-
public class Cli extends Object
The command-line runner for Dropwizard application.
-
-
Constructor Summary
Constructors Constructor Description Cli(JarLocation location, Bootstrap<?> bootstrap, OutputStream stdOut, OutputStream stdErr)Create a new CLI interface for a application and its bootstrapped environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrintWritergetStdErr()PrintWritergetStdOut()booleanrun(String... arguments)Runs the command line interface given some arguments.
-
-
-
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 applicationbootstrap- the bootstrap for the applicationstdOut- standard outstdErr- standard err
-
-
Method Detail
-
run
public boolean run(String... arguments) throws Exception
Runs the command line interface given some arguments.- Parameters:
arguments- the command line arguments- Returns:
- whether or not the command successfully executed
- Throws:
Exception- if something goes wrong
-
getStdOut
public PrintWriter getStdOut()
-
getStdErr
public PrintWriter getStdErr()
-
-