Interface IObservable

All Superinterfaces:
org.apache.wicket.util.io.IClusterable, Serializable
All Known Subinterfaces:
IClusterConfig, IFieldDescriptor, IModelReference<T>, IObservableModel<T>, IPluginConfig, ITypeDescriptor
All Known Implementing Classes:
AbstractClusterDecorator, AbstractPluginDecorator, BrowserSearchResultModel, BuiltinTypeDescriptor, ClusterConfigDecorator, CssClassAppender, DocumentsProvider, InheritingPluginConfig, JavaClusterConfig, JavaFieldDescriptor, JavaPluginConfig, JavaTypeDescriptor, JcrClusterConfig, JcrNodeModel, JcrObject, JcrPluginConfig, JcrPropertyModel, JcrQueryModel, ModelReference, NodeNameModel, NodePickerPluginConfig, Observable, ObservableModel, ObservablePropertyModel, ObservableTreeModel, StateIconAttributes, TextSearchResultModel, TypeStateAttributes

public interface IObservable extends org.apache.wicket.util.io.IClusterable
Interface implemented by observable objects. When multiple different observables are equivalent according to their equals(Object) method, observation is started on one instance.

This interface must be implemented by observable objects, but should not be invoked by plugins.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Equivalence of observables; observation will only be started on one instance.
    int
     
    void
    Before observation is started on the observable, an observation context is injected by the observer registry.
    void
    When the first IObserver of this observable is registered with the observer registry, observation is started.
    void
    When the last IObserver unregisters, observation is stopped.
  • Method Details

    • setObservationContext

      void setObservationContext(IObservationContext<? extends IObservable> context)
      Before observation is started on the observable, an observation context is injected by the observer registry. This context can be used to notify listeners.
    • startObservation

      void startObservation()
      When the first IObserver of this observable is registered with the observer registry, observation is started. Implementations must notify observers until observation is stopped.

      An implementation should register listeners with external data sources, when appropriate. It is possible for an observable to register as an observer for another observable.

    • stopObservation

      void stopObservation()
      When the last IObserver unregisters, observation is stopped. Any listeners or observers registered by the observable must be unregistered by the implementation.
    • equals

      boolean equals(Object obj)
      Equivalence of observables; observation will only be started on one instance.
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
      See Also: