Class ConfigurableSystemProcessExitCodeMapper
- java.lang.Object
- org.springframework.batch.core.step.tasklet.ConfigurableSystemProcessExitCodeMapper
- All Implemented Interfaces:
SystemProcessExitCodeMapper
public class ConfigurableSystemProcessExitCodeMapper extends java.lang.Object implements SystemProcessExitCodeMapper
Maps exit codes toExitStatusaccording to injected map. The injected map is required to contain a value for 'else' key, this value will be returned if the injected map does not contain value for the exit code returned by the system process.- Author:
- Robert Kasanicky
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELSE_KEY
Constructor Summary
Constructors Constructor Description ConfigurableSystemProcessExitCodeMapper()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExitStatusgetExitStatus(int exitCode)voidsetMappings(java.util.Map<java.lang.Object,ExitStatus> mappings)
Field Detail
ELSE_KEY
public static final java.lang.String ELSE_KEY
- See Also:
- Constant Field Values
Method Detail
getExitStatus
public ExitStatus getExitStatus(int exitCode)
- Specified by:
getExitStatusin interfaceSystemProcessExitCodeMapper- Parameters:
exitCode- exit code returned by the system process- Returns:
- ExitStatus appropriate for the
systemExitCodeparameter value
setMappings
public void setMappings(java.util.Map<java.lang.Object,ExitStatus> mappings)
- Parameters:
mappings-Integerexit code keys toExitStatusvalues.