public abstract class AbstractConfigurationProvider extends Object implements ConfigurationProvider
Constructor and Description |
---|
AbstractConfigurationProvider(TorqueGeneratorPaths configurationPaths)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getControlConfigurationInputStream()
Creates a reader to access the control configuration.
|
protected abstract InputStream |
getInputStream(String name,
String directory,
String fileDescription) |
InputStream |
getOptionsInputStream(String name)
Creates a reader to access an options file.
|
InputStream |
getOutletConfigurationInputStream(String name)
Creates a reader to access the configuration for one outlet.
|
InputStream |
getResourceInputStream(String name)
Creates a reader to access a resource file.
|
InputStream |
getTemplateInputStream(String name)
Creates a reader to access a template.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getControlConfigurationLocation, getOutletConfigurationNames, getTemplateNames
public AbstractConfigurationProvider(TorqueGeneratorPaths configurationPaths)
configurationPaths
- The internal directory structure of the
Torque generator configuration files, not null.NullPointerException
- if configurationPaths is null.public InputStream getControlConfigurationInputStream() throws ConfigurationException
ConfigurationProvider
getControlConfigurationInputStream
in interface ConfigurationProvider
ConfigurationException
- if the reader can not be created.public InputStream getTemplateInputStream(String name) throws ConfigurationException
ConfigurationProvider
getTemplateInputStream
in interface ConfigurationProvider
name
- the name (==path to) of the template.ConfigurationException
- if the reader can not be created.public InputStream getOutletConfigurationInputStream(String name) throws ConfigurationException
ConfigurationProvider
getOutletConfigurationInputStream
in interface ConfigurationProvider
name
- the name (==path to) of the outlet configuration.ConfigurationException
- if the reader can not be created.public InputStream getResourceInputStream(String name) throws ConfigurationException
ConfigurationProvider
getResourceInputStream
in interface ConfigurationProvider
name
- the path to of the resource file.ConfigurationException
- if the reader can not be created.public InputStream getOptionsInputStream(String name) throws ConfigurationException
ConfigurationProvider
getOptionsInputStream
in interface ConfigurationProvider
name
- the name (==path to) of the options file.ConfigurationException
- if the reader can not be created.protected abstract InputStream getInputStream(String name, String directory, String fileDescription) throws ConfigurationException
name
- input stream namedirectory
- locationfileDescription
- describes the fileConfigurationException
- if unable to processCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.