public class ConfigurableSystemProcessExitCodeMapper extends java.lang.Object implements SystemProcessExitCodeMapper
ExitStatus
according 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.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELSE_KEY |
Constructor and Description |
---|
ConfigurableSystemProcessExitCodeMapper() |
Modifier and Type | Method and Description |
---|---|
ExitStatus |
getExitStatus(int exitCode) |
void |
setMappings(java.util.Map<java.lang.Object,ExitStatus> mappings) |
public static final java.lang.String ELSE_KEY
public ConfigurableSystemProcessExitCodeMapper()
public ExitStatus getExitStatus(int exitCode)
getExitStatus
in interface SystemProcessExitCodeMapper
exitCode
- exit code returned by the system processsystemExitCode
parameter valuepublic void setMappings(java.util.Map<java.lang.Object,ExitStatus> mappings)
mappings
- Integer
exit code keys to
ExitStatus
values.