public class Foreman.ForemanResult extends Object implements AutoCloseable
| Constructor and Description |
|---|
ForemanResult() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Exception |
getException()
Expose the current exception (if it exists).
|
void |
setCompleted(UserBitShared.QueryResult.QueryState queryState)
Set up the result for a COMPLETED or CANCELED state.
|
void |
setFailed(Exception exception)
Set up the result for a FAILED state.
|
void |
setForceFailure(Exception exception)
Ignore the current status and force the given failure as current status.
|
public void setCompleted(UserBitShared.QueryResult.QueryState queryState)
Note that before sending this result, we execute cleanup steps that could result in this result still being changed to a FAILED state.
queryState - one of COMPLETED or CANCELEDpublic void setFailed(Exception exception)
Failures that occur during cleanup processing will be added as suppressed exceptions.
exception - the exception that led to the FAILED statepublic void setForceFailure(Exception exception)
public Exception getException()
public void close()
close in interface AutoCloseableCopyright © 2021 The Apache Software Foundation. All rights reserved.