Package org.apache.sis.storage.event
Interface StoreListener<E extends StoreEvent>
- Type Parameters:
E- the type of events of interest to this listener.
- All Superinterfaces:
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
StoreEvent
instance given to the eventOccured(StoreEvent) method. For example if a warning occurred
while reading data from a file, then the event will be an instance of WarningEvent.
Resource implementations are responsible for instantiating the most specific
StoreEvent subclass for the type of events. Then, all StoreListeners that
declared an interest for
StoreEvents 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:
Defined in the sis-storage module
-
Method Summary
Modifier and TypeMethodDescriptionvoideventOccured(E event) Invoked after a warning or a change occurred in a resource.
-
Method Details
-
eventOccured
Invoked after a warning or a change occurred in a resource. TheStoreEvent.getSource()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 benull.
-