Interface IObservationContext<T extends IObservable>
- All Superinterfaces:
org.apache.wicket.util.io.IClusterable
,Serializable
public interface IObservationContext<T extends IObservable>
extends org.apache.wicket.util.io.IClusterable
The context representing the observer registry to the observable.
Framework clients should not implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
notifyObservers
(EventCollection<IEvent<T>> events) Notify observers of events that pertain to an observable.void
registerObserver
(IObserver<?> observer) Register an observer.void
unregisterObserver
(IObserver<?> observer) Unregister an observer.
-
Method Details
-
notifyObservers
Notify observers of events that pertain to an observable. The events are dispatched to registered observers.Implementations should minimize the number of calls to this method, as all observers will be notified.
- Parameters:
events
- The events to be dispatched to observers
-
registerObserver
Register an observer. Allows observables to delegate subscriptions to one another. When an observable has been implemented in terms of another observable, it can translate events of the underlying observable into events that are appropriate for its own type.- Parameters:
observer
-
-
unregisterObserver
Unregister an observer.- Parameters:
observer
-
-