Package org.apache.sis.storage.event
Class CascadedStoreEvent.ParentListener<E extends CascadedStoreEvent<E>>
java.lang.Object
org.apache.sis.storage.event.CascadedStoreEvent.ParentListener<E>
- All Implemented Interfaces:
EventListener
,StoreListener<E>
- Enclosing class:
CascadedStoreEvent<E extends CascadedStoreEvent<E>>
static final class CascadedStoreEvent.ParentListener<E extends CascadedStoreEvent<E>>
extends Object
implements StoreListener<E>
A listener to register on the parent of a resource for cascading an event to the children.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe type of event to listen.private final WeakReference
<StoreListeners> The listeners to notify.private final StoreListeners
The parent resource to listen to. -
Constructor Summary
ConstructorsConstructorDescriptionParentListener
(Class<E> eventType, StoreListeners parent, StoreListeners listeners) Creates a new listener to be registered on the parent of the given set of listeners. -
Method Summary
Modifier and TypeMethodDescriptionvoid
eventOccured
(E event) Invoked when an event is fired on a parent resource.
-
Field Details
-
eventType
The type of event to listen. -
parent
The parent resource to listen to. -
listeners
The listeners to notify.
-
-
Constructor Details
-
ParentListener
ParentListener(Class<E> eventType, StoreListeners parent, StoreListeners listeners) Creates a new listener to be registered on the parent of the given set of listeners.- Parameters:
eventType
- the type of event to listen.parent
- the parent resource to listen to.listeners
- the child set of listeners.
-
-
Method Details
-
eventOccured
Invoked when an event is fired on a parent resource. This method causes similar event to be fired on children resources.- Specified by:
eventOccured
in interfaceStoreListener<E extends CascadedStoreEvent<E>>
- Parameters:
event
- description of the change or warning that occurred in a resource. Shall not benull
.
-