public class DefaultCompositeEventFilter extends Object implements CompositeEventFilter
EventFilter instances.
The match method calls all attached EventFilter instances to check if the
Event has to be filtered.| Constructor and Description |
|---|
DefaultCompositeEventFilter()
Creates a new DefaultCompositeEventFilter.
|
DefaultCompositeEventFilter(EventFilter... anEventFilters)
Creates a new DefaultCompositeEventFilter.
|
| Modifier and Type | Method and Description |
|---|---|
AppendableEventFilter |
attach(EventFilter anEventFilter)
Appends another
EventFilter which is used/called from the match method
(EventFilter.match(de.novanic.eventservice.client.event.Event)). |
boolean |
detach()
Detaches all attached
EventFilter instances. |
boolean |
detach(EventFilter anEventFilter)
Detaches the attached
EventFilter instances. |
List<EventFilter> |
getAttachedEventFilters()
Returns the attached EventFilters.
|
boolean |
match(Event anEvent)
If the match method returns true for an event, the event should be ignored, because the EventFilter recognizes
the event to filter it.
|
public DefaultCompositeEventFilter()
EventFilter instances
must be attached with AppendableEventFilter.attach(EventFilter) or
the constructor DefaultCompositeEventFilter(EventFilter...) must
be used to register EventFilter instances for the match method.public DefaultCompositeEventFilter(EventFilter... anEventFilters)
EventFilter instances
are used by the match method to filter the events. More EventFilter instances
can be attached with the attach method (AppendableEventFilter.attach(EventFilter)).anEventFilters - EventFilter which are used by the match methodpublic boolean match(Event anEvent)
EventFilter
instances to filter the events. See DefaultCompositeEventFilter(EventFilter...)
or AppendableEventFilter.attach(EventFilter) to append
EventFilter instances.match in interface EventFilteranEvent - event to checkpublic AppendableEventFilter attach(EventFilter anEventFilter)
EventFilter which is used/called from the match method
(EventFilter.match(de.novanic.eventservice.client.event.Event)).attach in interface AppendableEventFilteranEventFilter - EventFilter to attachEventFilter instances)public boolean detach(EventFilter anEventFilter)
EventFilter instances.
EventFilter instances can be attached with AppendableEventFilter.attach(EventFilter).detach in interface CompositeEventFilteranEventFilter - EventFilter to detachpublic boolean detach()
EventFilter instances.
EventFilter instances can be attached with AppendableEventFilter.attach(EventFilter).detach in interface CompositeEventFilterpublic List<EventFilter> getAttachedEventFilters()
AppendableEventFilter.attach(EventFilter).getAttachedEventFilters in interface CompositeEventFilterEventFilterCopyright © 2012. All Rights Reserved.