public abstract class CmdLineTool extends Object implements CliCommand
| Modifier and Type | Field and Description |
|---|---|
protected ChainingClassLoader |
chainingClassLoader |
protected String |
commandName |
protected BaseConfiguration |
configuration |
protected boolean |
dumpConfig |
protected boolean |
dumpDefaultConfig |
protected static String |
FILE_SEPARATOR |
protected com.google.inject.Injector |
injector |
protected com.github.joschi.jadconfig.JadConfig |
jadConfig |
protected static String |
TMPDIR |
protected static Version |
version |
| Modifier | Constructor and Description |
|---|---|
protected |
CmdLineTool(BaseConfiguration configuration) |
protected |
CmdLineTool(String commandName,
BaseConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
annotateInjectorCreationException(com.google.inject.CreationException e) |
protected void |
annotateInjectorExceptions(Collection<com.google.inject.spi.Message> messages) |
protected void |
beforeStart()
Things that have to run before the
startCommand() method is being called. |
protected Set<ServerStatus.Capability> |
capabilities() |
protected abstract List<com.google.inject.Module> |
getCommandBindings() |
protected abstract List<Object> |
getCommandConfigurationBeans() |
protected Collection<com.github.joschi.jadconfig.Repository> |
getConfigRepositories(String configFile) |
protected List<com.google.inject.Module> |
getSharedBindingsModules() |
boolean |
isDebug() |
boolean |
isDumpConfig() |
boolean |
isDumpDefaultConfig() |
protected Set<Plugin> |
loadPlugins(String pluginPath,
ChainingClassLoader chainingClassLoader) |
protected boolean |
onlyLogErrors() |
protected com.github.joschi.jadconfig.guice.NamedConfigParametersModule |
readConfiguration(String configFile) |
void |
run() |
protected com.google.inject.Injector |
setupInjector(com.github.joschi.jadconfig.guice.NamedConfigParametersModule configModule,
com.google.inject.Module... otherModules) |
protected org.apache.logging.log4j.Level |
setupLogger() |
protected abstract void |
startCommand() |
protected boolean |
validateConfiguration()
Validate the given configuration for this command.
|
protected static final Version version
protected static final String FILE_SEPARATOR
protected static final String TMPDIR
protected final com.github.joschi.jadconfig.JadConfig jadConfig
protected final BaseConfiguration configuration
protected final ChainingClassLoader chainingClassLoader
protected boolean dumpConfig
protected boolean dumpDefaultConfig
protected String commandName
protected com.google.inject.Injector injector
protected CmdLineTool(BaseConfiguration configuration)
protected CmdLineTool(String commandName, BaseConfiguration configuration)
protected boolean validateConfiguration()
true if the configuration is valid, false.public boolean isDumpConfig()
public boolean isDumpDefaultConfig()
public boolean isDebug()
protected abstract List<com.google.inject.Module> getCommandBindings()
protected void beforeStart()
startCommand() method is being called.protected abstract void startCommand()
protected org.apache.logging.log4j.Level setupLogger()
protected boolean onlyLogErrors()
protected Set<Plugin> loadPlugins(String pluginPath, ChainingClassLoader chainingClassLoader)
protected Collection<com.github.joschi.jadconfig.Repository> getConfigRepositories(String configFile)
protected com.github.joschi.jadconfig.guice.NamedConfigParametersModule readConfiguration(String configFile)
protected List<com.google.inject.Module> getSharedBindingsModules()
protected com.google.inject.Injector setupInjector(com.github.joschi.jadconfig.guice.NamedConfigParametersModule configModule,
com.google.inject.Module... otherModules)
protected void annotateInjectorCreationException(com.google.inject.CreationException e)
protected void annotateInjectorExceptions(Collection<com.google.inject.spi.Message> messages)
protected Set<ServerStatus.Capability> capabilities()
Copyright © 2012-2016 Graylog, Inc.. All Rights Reserved.