|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.observe.LocalObservationBus
@ThreadSafe public class LocalObservationBus
A simple Observer
that is itself Observable
. This class essentially multiplexes the events from a single
Observable to disseminate each event to multiple Observers.
Constructor Summary | |
---|---|
LocalObservationBus()
|
Method Summary | |
---|---|
boolean |
hasObservers()
Determine whether this particular bus currently has any observers. |
void |
notify(Changes changes)
Method that is called for each set of changes from the Observable instance(s) with which this
observer is registered. |
boolean |
register(Observer observer)
Register the supplied observer. |
void |
shutdown()
Unregister all registered observers, and mark this as no longer accepting new registered observers. |
void |
start()
Prepare this bus for operation by starting any resources. |
boolean |
unregister(Observer observer)
Unregister the supplied observer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalObservationBus()
Method Detail |
---|
public void start()
start
in interface ObservationBus
ObservationBus.start()
public boolean register(Observer observer)
register
in interface Observable
observer
- the observer to be added; may be null
Observable.register(org.modeshape.graph.observe.Observer)
public boolean unregister(Observer observer)
unregister
in interface Observable
observer
- the observer to be removed; may not be null
Observable.unregister(org.modeshape.graph.observe.Observer)
public void notify(Changes changes)
set of changes
from the Observable
instance(s) with which this
observer is registered.
notify
in interface Observer
changes
- the changes that are being publishedObserver.notify(org.modeshape.graph.observe.Changes)
public boolean hasObservers()
hasObservers
in interface ObservationBus
ObservationBus.hasObservers()
public void shutdown()
shutdown
in interface ObservationBus
ObservationBus.shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |