Package scriptella.tools.launcher
Class EtlLauncher
java.lang.Object
scriptella.tools.launcher.EtlLauncher
Command line launcher.
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumError codes returned by the launcher. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected PrintStreamgetErr()Stream used for launcher errors.protected PrintStreamgetOut()Stream used for launcher messages.protected booleanOverridable for testing.static voidprotected voidprotected voidresolveFile(File dir, String name) Resolves ETL file using the following rule: if specified file exists - it is returned, otherwise if file has no extensionname+".etl.xml" file is checked for presence and returned.voidsetNoJmx(boolean noJmx) Suppress JMX MBean registration for monitoring.voidsetNoStat(boolean suppressStatistics) voidsetProgressIndicator(ProgressIndicator indicator) voidsetProperties(Map<String, ?> props) Sets additional properties available for ETL.protected EtlLauncher.ErrorCode
-
Field Details
-
STD_FORMATTER
-
DEFAULT_FILE_NAME
- See Also:
-
-
Constructor Details
-
EtlLauncher
public EtlLauncher()
-
-
Method Details
-
getOut
Stream used for launcher messages. Overridable in tests. -
getErr
Stream used for launcher errors. Overridable in tests. -
setNoStat
public void setNoStat(boolean suppressStatistics) - Parameters:
suppressStatistics- true if statistics must be suppressed.- See Also:
-
setNoJmx
public void setNoJmx(boolean noJmx) Suppress JMX MBean registration for monitoring.- Parameters:
noJmx- true if JMX should be suppressed.
-
printVersion
protected void printVersion() -
printUsage
protected void printUsage() -
template
-
setProperties
Sets additional properties available for ETL.By default
System.getProperties()is used.- Parameters:
props- properties map.
-
setProgressIndicator
-
execute
- Throws:
EtlExecutorException
-
resolveFile
Resolves ETL file using the following rule: if specified file exists - it is returned, otherwise if file has no extensionname+".etl.xml" file is checked for presence and returned.- Parameters:
dir- parent directory, may be null.name- file name, may be null in this case default name is used.- Returns:
- resolved ETL file.
- Throws:
FileNotFoundException- if ETL file cannot be found.
-
isFile
Overridable for testing. -
main
-