@Immutable
public class StatusDetail
extends java.lang.Object
aggreagated
to the overall status of the application. This information is exposed by the
StatusController via REST.
In order to accounce the current status of some part of the application,
StatusDetailIndicator can be implemented.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.Map<java.lang.String,java.lang.String> |
getDetails()
Additional details about the current status of the job, component, ...
|
java.lang.String |
getMessage()
A short message describing the current status.
|
java.lang.String |
getName()
Short name of the status detail.
|
Status |
getStatus()
Status indicating the health / availability of the job, component, ...
|
int |
hashCode() |
static StatusDetail |
statusDetail(java.lang.String name,
Status status,
java.lang.String message) |
static StatusDetail |
statusDetail(java.lang.String name,
Status status,
java.lang.String message,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes) |
StatusDetail |
toError(java.lang.String message)
Create a copy of this StatusDetail, updates the message, changes the status to ERROR,
and return the new StatusDetail.
|
StatusDetail |
toOk(java.lang.String message)
Create a copy of this StatusDetail, updates the message, changes the status to OK,
and return the new StatusDetail.
|
java.lang.String |
toString() |
StatusDetail |
toWarning(java.lang.String message)
Create a copy of this StatusDetail, updates the message, changes the status to WARNING,
and return the new StatusDetail.
|
StatusDetail |
withDetail(java.lang.String key,
java.lang.String value)
Create a copy of this StatusDetail, add a detail and return the new StatusDetail.
|
StatusDetail |
withoutDetail(java.lang.String key)
Create a copy of this StatusDetail, remove a detail and return the new StatusDetail.
|
public static StatusDetail statusDetail(java.lang.String name, Status status, java.lang.String message)
public static StatusDetail statusDetail(java.lang.String name, Status status, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
public StatusDetail toOk(java.lang.String message)
message - the new messagepublic StatusDetail toWarning(java.lang.String message)
message - the new messagepublic StatusDetail toError(java.lang.String message)
message - the new messagepublic StatusDetail withDetail(java.lang.String key, java.lang.String value)
key - the key of the additional detailvalue - the value of the additional detailpublic StatusDetail withoutDetail(java.lang.String key)
key - the key of the additional detailpublic java.lang.String getName()
public Status getStatus()
public java.lang.String getMessage()
public java.util.Map<java.lang.String,java.lang.String> getDetails()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object