Class CloseEvent
- All Implemented Interfaces:
Serializable, Localized
Notifies listeners that a resource or a data store is being closed and should no longer be used.
Firing a
CloseEvent on a parent resource (typically a data store)
automatically fires a CloseEvent in all children resources.
See CascadedStoreEvent javadoc for more information.- Since:
- 1.3
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionCloseEvent(Resource source) Constructs an event for a resource that has been closed. -
Method Summary
Modifier and TypeMethodDescriptionprotected CloseEventforSource(Resource child) Creates a new event of the same type as this event but with a different source.Methods inherited from class StoreEvent
consume, getLocale, getSource, isConsumedModifier and TypeMethodDescriptionvoidconsume(boolean later) Marks this event as consumed.Returns the locale associated with this event, ornullif unspecified.Returns the resource where the event occurred.final booleanIndicates whether this event has been consumed by any listener.Methods inherited from class EventObject
toString
-
Constructor Details
-
CloseEvent
Constructs an event for a resource that has been closed.- Parameters:
source- the resource which has been closed.- Throws:
IllegalArgumentException- if the given source is null.
-
-
Method Details
-
forSource
Creates a new event of the same type as this event but with a different source.- Specified by:
forSourcein classCascadedStoreEvent<CloseEvent>- Parameters:
child- the child resource for which to create the event to cascade.- Returns:
- an event of the same type as this event but with the given resource.
-