Interface StoreListener<E extends StoreEvent>

Type Parameters:
E - the type of events of interest to this listener.
All Superinterfaces:
Event­Listener

public interface StoreListener<E extends StoreEvent> extends EventListener
An object which listens for events (typically changes or warnings) occurring in a resource or one of its children. The kind of event is defined by the subclass of the Store­Event instance given to the event­Occured(Store­Event) method. For example if a warning occurred while reading data from a file, then the event will be an instance of Warning­Event.

Resource implementations are responsible for instantiating the most specific Store­Event subclass for the type of events. Then, all Store­Listeners that declared an interest for Store­Events of that kind are notified, including listeners in parent resources. Each listener is notified only once per event even if the listener is registered twice.

Since:
1.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invoked after a warning or a change occurred in a resource.
  • Method Details

    • eventOccured

      void eventOccured(E event)
      Invoked after a warning or a change occurred in a resource. The Store­Event​.get­Source() method gives the resource where the event occurred. It is not necessarily the resource in which this listener has been registered; it may be one of the resource children.
      Parameters:
      event - description of the change or warning that occurred in a resource. Shall not be null.