Interface IObserver<T extends IObservable>

All Superinterfaces:
EventListener, org.apache.wicket.util.io.IClusterable, Serializable
All Known Implementing Classes:
AbstractListingPlugin, AbstractRenderService, BreadcrumbPlugin, BrowserPlugin, CompatibilityWorkflowPlugin, ExpandCollapseListingPlugin, JcrTreeModel, ListRenderService, ListViewPlugin, ListViewService, Observer, PanelPluginPerspective, Perspective, RenderPlugin, RenderService, TabsContainerService, TabsPlugin, TabsPlugin.Tab

public interface IObserver<T extends IObservable> extends EventListener, org.apache.wicket.util.io.IClusterable
This interface defines the contract for a service that updates its internal state in response to changes in an observable object (IObservable). Instances should be registered as a service (IPluginContext.registerService(IClusterable, String)) with name IObserver.class.getName(). The observer registry will notify the observer of any events sent by the observable.
  • Method Summary

    Modifier and Type
    Method
    Description
    The observable that the observer is interested in.
    void
    onEvent(Iterator<? extends IEvent<T>> events)
    Callback that is invoked when the observable sends events.
  • Method Details

    • getObservable

      T getObservable()
      The observable that the observer is interested in. This observable may not change, w.r.t. the IObservable.equals(java.lang.Object) method, while the observer is registered.
    • onEvent

      void onEvent(Iterator<? extends IEvent<T>> events)
      Callback that is invoked when the observable sends events. The iterator is guaranteed to be non-empty.