Class ExtensionEventFilter
- java.lang.Object
-
- net.sf.basedb.util.extensions.events.ExtensionEventFilter
-
- All Implemented Interfaces:
EventFilter
public class ExtensionEventFilter extends Object implements EventFilter
Event filter that only passes events for a specific extension.- Since:
- 3.10
- Author:
- nicklas
-
-
Constructor Summary
Constructors Constructor Description ExtensionEventFilter(String id, EventType eventType)
Create a new extension event filter.ExtensionEventFilter(Extension<?> extension, EventType eventType)
Create a new extension event filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shouldSend(EventType event, ExtensionPoint<?> extensionPoint, Extension<?> extension)
Determine if the event should be sent to the event handler or not.
-
-
-
Method Detail
-
shouldSend
public boolean shouldSend(EventType event, ExtensionPoint<?> extensionPoint, Extension<?> extension)
Description copied from interface:EventFilter
Determine if the event should be sent to the event handler or not.- Specified by:
shouldSend
in interfaceEventFilter
- Parameters:
event
- The event that happendextensionPoint
- The extension point that the extension extends, or that the event happened toextension
- The extension the event happend to, or null if the event happended to the extension point- Returns:
- TRUE if the extension has the same ID as the one given in the constructor and if the event type matches
-
-