Class EventTypeFilter
- java.lang.Object
-
- net.sf.basedb.util.extensions.events.EventTypeFilter
-
- All Implemented Interfaces:
EventFilter
public class EventTypeFilter extends Object implements EventFilter
Event filter that only passes on events of a specifiec event type.- Version:
- 2.8
- Author:
- nicklas
- Last modified
- $Date: 2008-09-11 22:08:14 +0200 (to, 11 sep 2008) $
-
-
Constructor Summary
Constructors Constructor Description EventTypeFilter(EventType type)
Create a new event type 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.
-
-
-
Field Detail
-
type
private final EventType type
-
-
Constructor Detail
-
EventTypeFilter
public EventTypeFilter(EventType type)
Create a new event type filter. This filter will pass events that are of the same type as given in the constructor.- Parameters:
type
- The event type
-
-
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 event type is the same as given in the constructor
-
-