Class AbstractExitStatus
java.lang.Object
gov.nist.secauto.metaschema.cli.processor.AbstractExitStatus
- All Implemented Interfaces:
ExitStatus
- Direct Known Subclasses:
MessageExitStatus
,NonMessageExitStatus
-
Constructor Summary
ConstructorDescriptionAbstractExitStatus
(ExitCode exitCode) Construct a new exit status based on the providedexitCode
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateMessage
(boolean showStackTrace) Process the exit status.Get the exit code information associated with this exit status.protected abstract String
Get the associated message.Get the associated throwable.withThrowable
(Throwable throwable) Associate a throwable with the exit status.
-
Constructor Details
-
AbstractExitStatus
Construct a new exit status based on the providedexitCode
.- Parameters:
exitCode
- the exit code
-
-
Method Details
-
getExitCode
Description copied from interface:ExitStatus
Get the exit code information associated with this exit status.- Specified by:
getExitCode
in interfaceExitStatus
- Returns:
- the exit code information
-
getThrowable
Get the associated throwable.- Specified by:
getThrowable
in interfaceExitStatus
- Returns:
- the throwable or
null
-
withThrowable
Description copied from interface:ExitStatus
Associate a throwable with the exit status.- Specified by:
withThrowable
in interfaceExitStatus
- Parameters:
throwable
- the throwable- Returns:
- this exit status
-
getMessage
Get the associated message.- Returns:
- the message or
null
-
generateMessage
Description copied from interface:ExitStatus
Process the exit status.- Specified by:
generateMessage
in interfaceExitStatus
- Parameters:
showStackTrace
- include the stack trace for the throwable, if associated- See Also:
-