T
- type of the teetime configuration to be usedR
- type of the parameter configuration objectpublic abstract class AbstractService<T extends teetime.framework.Configuration,R> extends AbstractLegacyTool<R>
protected T createTeetimeConfiguration()
protected boolean checkParameters(final JCommander commander)
protected File getConfigurationFile()
protected boolean checkConfiguration(final Configuration kiekerConfiguration, final JCommander commander)
protected void shutdownService()
public static void main(final String[] args) {
final ExampleMain main = new ExampleMain();
System.exit(main.run("Example Tool", "Log label", args, main));
}
CONFIGURATION_ERROR, help, kiekerConfiguration, logger, PARAMETER_ERROR, parameterConfiguration, RUNTIME_ERROR, SUCCESS_EXIT_CODE, USAGE_EXIT_CODE
Constructor and Description |
---|
AbstractService()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createTeetimeConfiguration()
Create and initialize teetime configuration for a service.
|
protected int |
execute(com.beust.jcommander.JCommander commander,
java.lang.String label)
Execute the tool.
|
checkConfiguration, checkParameters, getConfigurationFile, readConfiguration, run, shutdownService
protected int execute(com.beust.jcommander.JCommander commander, java.lang.String label) throws ConfigurationException
execute
in class AbstractLegacyTool<R>
commander
- command line parter JCommanderlabel
- printed to the debug log about what application is running.ConfigurationException
- on configuration errors occuring at runtimeprotected abstract T createTeetimeConfiguration() throws ConfigurationException
ConfigurationException
- in case the creation failsCopyright 2020 Kieker Project, http://kieker-monitoring.net