uk.org.ogsadai.engine
Class ObservableStatus
java.lang.Object
|
+--java.util.Observable
|
+--uk.org.ogsadai.engine.ObservableStatus
- public class ObservableStatus
- extends java.util.Observable
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.
- Author:
- The OGSA-DAI Project Team
| 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. |
| 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 |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement.
- See Also:
- Constant Field Values
LOG
private static DAILogger LOG
-
Logger object for logging in this class.
mStatus
private Status mStatus
-
The status field that is being observed.
mName
private final java.lang.String mName
-
User-friendly name used in logging messages.
ObservableStatus
public ObservableStatus(Status status)
-
Constructs an
ObservableStatus class with the specified initial status and an automatically generated name. The name will simply be used in logging messages.
- Parameters:
status - The initial Status.
ObservableStatus
public ObservableStatus(java.lang.String name,
Status status)
-
Constructs an
ObservableStatus class with the specified initial status and name.
- Parameters:
status - The initial Status.
name - The name for the ObservableStatus. This will simply be used in logging messages.
getStatus
public final Status getStatus()
-
Gets the current status.
-
- Returns:
- a
Status reference.
setStatus
public final void setStatus(Status status)
-
Sets the status and notifies any observers of the change.
-
- Parameters:
status - The new Status. This will be passed to the notifyObservers method.