Class SimpleJvmExitCodeMapper
- java.lang.Object
- org.springframework.batch.core.launch.support.SimpleJvmExitCodeMapper
- All Implemented Interfaces:
ExitCodeMapper
public class SimpleJvmExitCodeMapper extends java.lang.Object implements ExitCodeMapper
An implementation ofExitCodeMapper
that can be configured through a map from batch exit codes (String) to integer results. Some default entries are set up to recognise common cases. Any that are injected are added to these.- Author:
- Stijn Maller, Lucas Ward, Dave Syer
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
logger
Fields inherited from interface org.springframework.batch.core.launch.support.ExitCodeMapper
JOB_NOT_PROVIDED, JVM_EXITCODE_COMPLETED, JVM_EXITCODE_GENERIC_ERROR, JVM_EXITCODE_JOB_ERROR, NO_SUCH_JOB
Constructor Summary
Constructors Constructor Description SimpleJvmExitCodeMapper()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Integer>
getMapping()
int
intValue(java.lang.String exitCode)
Get the operating system exit status that matches a certain Batch Framework exit codevoid
setMapping(java.util.Map<java.lang.String,java.lang.Integer> exitCodeMap)
Supply the ExitCodeMappings
Method Detail
getMapping
public java.util.Map<java.lang.String,java.lang.Integer> getMapping()
setMapping
public void setMapping(java.util.Map<java.lang.String,java.lang.Integer> exitCodeMap)
Supply the ExitCodeMappings- Parameters:
exitCodeMap
- A set of mappings between environment specific exit codes and batch framework internal exit codes
intValue
public int intValue(java.lang.String exitCode)
Get the operating system exit status that matches a certain Batch Framework exit code- Specified by:
intValue
in interfaceExitCodeMapper
- Parameters:
exitCode
- The exit code of the Batch Job as known by the Batch Framework- Returns:
- The exitCode of the Batch Job as known by the JVM