|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.util.StatusValue
A multi-state status value. Optionally has an associated message describing the success or failure state of the value.
The status message is usually set to explain a failure status. Frequently left null for a successful status.
Field Summary | |
static int |
FAILED
|
static int |
PARTIALLY_SUCCEEDED
|
static int |
SUCCEEDED
|
static StatusValue |
SUCCESS_RESULT
|
Constructor Summary | |
StatusValue(int statusCode)
Create a new status value with the specified status code. |
|
StatusValue(int statusCode,
java.lang.String message)
Create a new status value with the specified status code and descriptive message. |
Method Summary | |
boolean |
failed()
Answer whether the status indicates failure. |
java.lang.String |
getMessage()
Answer the message describing this status value. |
int |
getStatusCode()
Answer the status code. |
void |
setMessage(java.lang.String message)
Specify the message describing this status value. |
boolean |
succeeded()
Answer whether the status indicates success. |
boolean |
succeededCompletely()
Answer whether the status indicates complete success. |
boolean |
succeededPartially()
Answer whether the status indicates partial success. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SUCCEEDED
public static final int FAILED
public static final int PARTIALLY_SUCCEEDED
public static final StatusValue SUCCESS_RESULT
Constructor Detail |
public StatusValue(int statusCode)
public StatusValue(int statusCode, java.lang.String message)
Method Detail |
public boolean failed()
public java.lang.String getMessage()
public int getStatusCode()
public void setMessage(java.lang.String message)
public boolean succeeded()
The default semantics of success is that only complete success is deemed acceptable. Subclasses may allow a more forgiving point of view and allow cases of partial success to be deemed successful.
public boolean succeededCompletely()
public boolean succeededPartially()
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |