T - configuration typepublic class ConsoleCommand<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>
extends io.dropwizard.cli.ConfiguredCommand<T>
Also can be used to launch commands directly or external commands file. This time process will exit right after commands execution.
To execute sql file: console config.yml commands.sql
To execute commands: console config.yml command1;command2
NOTE: server will not start when console command called, because dropwizard will not run managed objects this time (only server command triggers managed objects lifecycle). But plocal connections still could be used. Also, if server already started, then you can use remote connections.
See orient console documentationOConsoleDatabaseApp| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMANDS_ARG |
| Constructor and Description |
|---|
ConsoleCommand(java.lang.Class<T> configClass) |
ConsoleCommand(java.lang.Class<T> configClass,
java.lang.String commandName) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(net.sourceforge.argparse4j.inf.Subparser subparser) |
protected java.lang.Class<T> |
getConfigurationClass() |
protected void |
run(io.dropwizard.setup.Bootstrap<T> bootstrap,
net.sourceforge.argparse4j.inf.Namespace namespace,
T configuration) |
public static final java.lang.String COMMANDS_ARG
public ConsoleCommand(java.lang.Class<T> configClass)
configClass - configuration classpublic ConsoleCommand(java.lang.Class<T> configClass, java.lang.String commandName)
configClass - configuration classcommandName - command name to override default 'console' nameprotected java.lang.Class<T> getConfigurationClass()
getConfigurationClass in class io.dropwizard.cli.ConfiguredCommand<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>public void configure(net.sourceforge.argparse4j.inf.Subparser subparser)
configure in class io.dropwizard.cli.ConfiguredCommand<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>protected void run(io.dropwizard.setup.Bootstrap<T> bootstrap, net.sourceforge.argparse4j.inf.Namespace namespace, T configuration) throws java.lang.Exception
run in class io.dropwizard.cli.ConfiguredCommand<T extends io.dropwizard.Configuration & HasOrientServerConfiguration>java.lang.Exception