Package org.apache.sis.storage.event
Class StoreEvent
Object
EventObject
StoreEvent
- All Implemented Interfaces:
- Serializable,- Localized
- Direct Known Subclasses:
- CascadedStoreEvent,- WarningEvent
Parent class of events happening in a data store resource.
 The event may be a warning or a change in the metadata, content or structure of a resource.
 Those events are created by 
Resource implementations and sent to all registered listeners.- Since:
- 1.0
- See Also:
Defined in the sis-storage module
- 
Field SummaryFields inherited from class EventObjectsource
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedStoreEvent(Resource source) Constructs an event that occurred in the given resource.
- 
Method SummaryModifier and TypeMethodDescriptionvoidconsume(boolean later) Marks this event as consumed.Returns the locale associated to 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 EventObjecttoString
- 
Constructor Details- 
StoreEventConstructs an event that occurred in the given resource.- Parameters:
- source- the resource where the event occurred.
- Throws:
- IllegalArgumentException- if the given source is null.
 
 
- 
- 
Method Details- 
getSourceReturns the resource where the event occurred. It is not necessarily the resource in which listeners have been registered; it may be one of the resource children.- Overrides:
- getSourcein class- EventObject
- Returns:
- the resource where the event occurred.
 
- 
getLocaleReturns the locale associated to this event, ornullif unspecified. That locale may be used for formatting messages related to this event. The event locale is typically inherited from theDataStorelocale.- Specified by:
- getLocalein interface- Localized
- Returns:
- the locale associated to this event (typically specified by the data store),
         or nullif unknown.
- See Also:
 
- 
isConsumedpublic final boolean isConsumed()Indicates whether this event has been consumed by any listener. A consumed event is not propagated further to other listeners.- Returns:
- trueif this event has been consumed,- falseotherwise.
- Since:
- 1.3
 
- 
consumepublic void consume(boolean later) Marks this event as consumed. This stops its further propagation to other listeners.- Parameters:
- later-- falsefor consuming now, or- truefor consuming after all listeners registered on the source resource but before listeners registered on the parent resource or data store.
- Since:
- 1.3
 
 
-