net.aerith.misao.util
Class OperationObservable
java.lang.Object
|
+--net.aerith.misao.util.OperationObservable
- Direct Known Subclasses:
- CatalogTreeManager, GlobalDBManager, Operation, ThumbnailImageCreater
- public abstract class OperationObservable
- extends java.lang.Object
The OperationObservable
represents an object with an
operation whose progress is observable.
Field Summary |
protected java.util.Vector |
observer_list
The list of observers. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
observer_list
protected java.util.Vector observer_list
- The list of observers.
OperationObservable
public OperationObservable()
addObserver
public void addObserver(OperationObserver observer)
- Adds an observer.
- Parameters:
observer
- an observer
deleteObserver
public void deleteObserver(OperationObserver observer)
- Removes an observer.
- Parameters:
observer
- an observer
notifyStart
protected void notifyStart()
- Notifies when the operation starts.
notifyEnd
protected void notifyEnd(java.lang.Exception exception)
- Notifies when the operation ends.
- Parameters:
exception
- the exception if an error occurs, or null if
succeeded.
notifySucceeded
protected void notifySucceeded(java.lang.Object arg)
- Notifies when a task is succeeded.
- Parameters:
arg
- the argument.
notifyFailed
protected void notifyFailed(java.lang.Object arg)
- Notifies when a task is failed.
- Parameters:
arg
- the argument.
notifyWarned
protected void notifyWarned(java.lang.Object arg)
- Notifies when a task is warned.
- Parameters:
arg
- the argument.