Class ConfigurableSystemProcessExitCodeMapper

  • All Implemented Interfaces:
    SystemProcessExitCodeMapper

    public class ConfigurableSystemProcessExitCodeMapper
    extends java.lang.Object
    implements SystemProcessExitCodeMapper
    Maps exit codes to 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.
    Author:
    Robert Kasanicky
    • Constructor Detail

      • ConfigurableSystemProcessExitCodeMapper

        public ConfigurableSystemProcessExitCodeMapper()
    • Method Detail

      • getExitStatus

        public ExitStatus getExitStatus​(int exitCode)
        Specified by:
        getExitStatus in interface SystemProcessExitCodeMapper
        Parameters:
        exitCode - exit code returned by the system process
        Returns:
        ExitStatus appropriate for the systemExitCode parameter value
      • setMappings

        public void setMappings​(java.util.Map<java.lang.Object,​ExitStatus> mappings)
        Parameters:
        mappings - Integer exit code keys to ExitStatus values.