@Immutable public final class Status extends Object
Status class is an outcome that provides an outcome or result of an operation.| Modifier and Type | Class and Description |
|---|---|
static class |
Status.Severity
The status severity levels.
|
| Modifier and Type | Field and Description |
|---|---|
static Status |
OK_STATUS
A status with an OK severity and no message and no exception.
|
| Constructor and Description |
|---|
Status(Status.Severity severity,
String message,
Throwable exception) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getException() |
String |
getMessage() |
Status.Severity |
getSeverity() |
boolean |
isError() |
boolean |
isInfo() |
boolean |
isOk() |
boolean |
isUnknown() |
boolean |
isWarning() |
String |
toString() |
public static final Status OK_STATUS
Status.Severity.OKpublic Status(Status.Severity severity, String message, Throwable exception)
severity - the status severity (if null it will be converted to Status.Severity.UNKNOWN.message - the status message (if null it will be returned as an empty string)exception - the status exception or nullpublic Throwable getException()
null)public String getMessage()
null but can be empty)public Status.Severity getSeverity()
null)public boolean isError()
true if the status has a severity of error.public boolean isInfo()
true if the status has a severity of info.public boolean isOk()
true if the status has a severity of OK.public boolean isUnknown()
true if the status has a severity of unknown.public boolean isWarning()
true if the status has a severity of warning.public String toString()
toString in class ObjectObject.toString()Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.