public class DefaultEventFilter extends Object implements CascadingEventFilter
EventFilter interface.
When no EventFilter is attached to the DefaultEventFilter,
the DefaultEventFilter doesn't filter any events, because the match method returns false. An optional
EventFilter instance can be attached using
AppendableEventFilter.attach(EventFilter) or the constructor
DefaultEventFilter(EventFilter) and is used/called
by the default implementation of the match method of DefaultEventFilter. The DefaultEventFilter implements the
CascadingEventFilter interface to allow to build cascading filter
sequences. A CascadingEventFilter can only hold one (the next) EventFilter.
See CascadingEventFilter for more information.| Constructor and Description |
|---|
DefaultEventFilter()
Creates a new DefaultEventFilter.
|
DefaultEventFilter(EventFilter aNextEventFilter)
Creates a new DefaultEventFilter.
|
| Modifier and Type | Method and Description |
|---|---|
AppendableEventFilter |
attach(EventFilter anEventFilter)
Sets/Attaches another
EventFilter which is used/called from the match method
(EventFilter.match(de.novanic.eventservice.client.event.Event)). |
boolean |
detach()
Detaches the attached
EventFilter. |
EventFilter |
getAttachedEventFilter()
Returns the attached EventFilter.
|
boolean |
match(Event anEvent)
When no
EventFilter is attached to the DefaultEventFilter,
no events will be filtered, because that method implementation returns false. |
public DefaultEventFilter()
EventFilter can
be set/attached with AppendableEventFilter.attach(EventFilter) or
the constructor DefaultEventFilter(EventFilter).public DefaultEventFilter(EventFilter aNextEventFilter)
EventFilter is used by
the default implementation of the match method (in DefaultEventFilter) to filter the events.aNextEventFilter - EventFilter to attachpublic boolean match(Event anEvent)
EventFilter is attached to the DefaultEventFilter,
no events will be filtered, because that method implementation returns false. An optional
EventFilter instance can be attached using
AppendableEventFilter.attach(EventFilter) or the constructor
DefaultEventFilter(EventFilter).match in interface EventFilteranEvent - eventEventFilterpublic AppendableEventFilter attach(EventFilter anEventFilter)
EventFilter which is used/called from the match method
(EventFilter.match(de.novanic.eventservice.client.event.Event)).
A CascadingEventFilter can only hold one EventFilter.attach in interface AppendableEventFilteranEventFilter - EventFilter to attach/setpublic boolean detach()
EventFilter. A CascadingEventFilter can
only hold one EventFilter.
EventFilter instances can be attached with AppendableEventFilter.attach(EventFilter).detach in interface CascadingEventFilterpublic EventFilter getAttachedEventFilter()
EventFilter.
EventFilter instances can be attached with AppendableEventFilter.attach(EventFilter).getAttachedEventFilter in interface CascadingEventFilterEventFilterCopyright © 2012. All Rights Reserved.