|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--uk.org.ogsadai.engine.ObservableStatus
This is an Observable
wrapper around a Status
field. Observer
implementations can be registered and they will
each be updated every time the status is changed using the
setStatus
method.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement. |
private static DAILogger |
LOG
Logger object for logging in this class. |
private java.lang.String |
mName
User-friendly name used in logging messages. |
private Status |
mStatus
The status field that is being observed. |
Fields inherited from class java.util.Observable |
|
Constructor Summary | |
ObservableStatus(Status status)
Constructs an ObservableStatus class with the specified
initial status and an automatically generated name. |
|
ObservableStatus(java.lang.String name,
Status status)
Constructs an ObservableStatus class with the specified
initial status and name. |
Method Summary | |
Status |
getStatus()
Gets the current status. |
void |
setStatus(Status status)
Sets the status and notifies any observers of the change. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
private Status mStatus
private final java.lang.String mName
Constructor Detail |
public ObservableStatus(Status status)
ObservableStatus
class with the specified
initial status and an automatically generated name. The name will
simply be used in logging messages.
status
- The initial Status
.public ObservableStatus(java.lang.String name, Status status)
ObservableStatus
class with the specified
initial status and name.
status
- The initial Status
.name
- The name for the ObservableStatus
. This will
simply be used in logging messages.Method Detail |
public final Status getStatus()
Status
reference.public final void setStatus(Status status)
status
- The new Status
. This will be passed to the
notifyObservers
method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |