|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.graph.observe.ChangeObserver
@ThreadSafe public abstract class ChangeObserver

Abstract class that is used to signal that a change set has occurred. This class is typically subclassed by those that wish to
observe changes in content, and registered with a Observable.
This class maintains a (weak) reference to the ChangeSource instances with which it is registered. Therefore, the observers
will not keep a ChangeSource from being garbage collected. And, if a change source is garbage collected, calling
unregister() will clean up naturally.
| Method Summary | |
|---|---|
boolean |
isRegistered()
Determine whether this observer is currently registered with any Observable instances. |
abstract void |
notify(Changes changeSet)
Method that is called for each Changes from the Observable instance(s) with which this listener is
registered. |
void |
unregister()
Unregister this listener from all sources that it was registered with. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void unregister()
sources that it was registered with. This is preferred over calling
Observable.unregister(Observer) directly.
public boolean isRegistered()
Observable instances.
Although an observer might be registered with an Observable, if that Observable is garbage collected, then this
observer will no longer be registered with it.
Observable instance, or false if this observer is not
currently registered with any Observable instances.public abstract void notify(Changes changeSet)
Changes from the Observable instance(s) with which this listener is
registered.
notify in interface ObserverchangeSet - the change set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||