|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.shirako.common.UpdateData
public class UpdateData
UpdateData wraps state passed with a ticket or lease update. Server-side code registers status of operations as they execute; client-side code queries for status, and may also post status.
| Field Summary | |
|---|---|
protected java.lang.String |
events
Printable list of events leading up to the last update. |
protected boolean |
failed
Did the last operation fail? |
protected java.lang.String |
message
Status message reflecting the result of this update. |
static java.lang.String |
PropertyEvents
|
static java.lang.String |
PropertyFailed
|
static java.lang.String |
PropertyMessage
|
| Constructor Summary | |
|---|---|
UpdateData()
Creates a new default instace. |
|
UpdateData(java.lang.String message)
Creates a new instance using the specified message. |
|
| Method Summary | |
|---|---|
void |
absorb(UpdateData update)
Merges passed UpdateData into this. |
void |
clear()
Clears all events. |
void |
error(java.lang.String message)
Indicates that an error has occurred. |
boolean |
failed()
Checks if the operation represented by the object has failed. |
java.lang.String |
getEvents()
Returns all events stored in the object. |
java.lang.String |
getMessage()
Returns the message attached to the object. |
void |
post(java.lang.String event)
Posts a human-readable string describing an event that the user may wish to know about. |
void |
postError(java.lang.String event)
Posts a human-readable string describing an event that the user may wish to know about, and also marks the UpdateData in a failed state. |
void |
reset(java.util.Properties p)
De-serializes the object from the given properties list. |
java.util.Properties |
save()
Serializes the object into a properties list. |
void |
save(java.util.Properties p)
Serializes the object into the given properties list. |
boolean |
successful()
Checks if the operation represented by the object has succeeded. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PropertyMessage
public static final java.lang.String PropertyEvents
public static final java.lang.String PropertyFailed
protected java.lang.String message
protected java.lang.String events
protected boolean failed
| Constructor Detail |
|---|
public UpdateData()
public UpdateData(java.lang.String message)
message - message to use| Method Detail |
|---|
public void error(java.lang.String message)
message - error messagepublic void post(java.lang.String event)
event - message describing eventpublic void postError(java.lang.String event)
event - message describing eventpublic void absorb(UpdateData update)
update - absorbed update datapublic void clear()
public boolean failed()
public boolean successful()
public java.lang.String getEvents()
public java.lang.String getMessage()
public java.util.Properties save()
throws java.lang.Exception
ISerialize
save in interface ISerializejava.lang.Exception
public void save(java.util.Properties p)
throws java.lang.Exception
ISerialize
save in interface ISerializep - properties list to serialize the object into
java.lang.Exception
public void reset(java.util.Properties p)
throws java.lang.Exception
ISerialize
reset in interface ISerializep - properties list containing the serialized version of
the object
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||