Class ExtensionPointEventFilter
java.lang.Object
net.sf.basedb.util.extensions.events.ExtensionPointEventFilter
- All Implemented Interfaces:
EventFilter
public class ExtensionPointEventFilter extends Object implements EventFilter
Event filter that only passes events for a specific extension point.
- Version:
- 2.8
- Author:
- nicklas
- Last modified
- $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ExtensionPointEventFilter(String id)
Create a new extension point event filterExtensionPointEventFilter(ExtensionPoint<?> extensionPoint)
Create a new extension point event filter. -
Method Summary
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.
-
Field Details
-
id
-
-
Constructor Details
-
ExtensionPointEventFilter
Create a new extension point event filter.- Parameters:
extensionPoint
- The extension point to pass events for
-
ExtensionPointEventFilter
Create a new extension point event filter- Parameters:
id
- The ID of the extension point
-
-
Method Details
-
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 point has the same ID as the one given in the constructor
-