org.xwiki.observation.event.filter
Class AlwaysMatchingEventFilter
java.lang.Object
org.xwiki.observation.event.filter.AlwaysMatchingEventFilter
- All Implemented Interfaces:
- Serializable, EventFilter
public class AlwaysMatchingEventFilter
- extends Object
- implements EventFilter, Serializable
An EventFilter that always matches another event filter.
- Version:
- $Id: 5616b027697c4a8e3735baa367c73a366bdafc07 $
- See Also:
- Serialized Form
|
Method Summary |
String |
getFilter()
Provides access to the filter's criterion. |
boolean |
matches(EventFilter eventFilter)
Compares two event filters to see if they match, meaning that the "contexts" of two events are
compatible. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlwaysMatchingEventFilter
public AlwaysMatchingEventFilter()
getFilter
public String getFilter()
- Description copied from interface:
EventFilter
- Provides access to the filter's criterion.
- Specified by:
getFilter in interface EventFilter
- Returns:
- the filter used in the
EventFilter.matches(EventFilter) method to verify if a passed event filter matches
it. - See Also:
EventFilter.matches(EventFilter)
matches
public boolean matches(EventFilter eventFilter)
- Description copied from interface:
EventFilter
- Compares two event filters to see if they match, meaning that the "contexts" of two events are
compatible. For example, a
FixedNameEventFilter matches another filter only if they both have the same
name set as the filter, while an AlwaysMatchingEventFilter matches any other event filter. A listener
that registered to receive notifications like referenceEvent and with
referenceEventFilter, will be notified of any occuring event for which
referenceEvent.matches(occuringEvent) will return true and
referenceEvent.getEventFilter().matches(occurringEvent.getEventFilter()).
- Specified by:
matches in interface EventFilter
- Parameters:
eventFilter - the event filter to compare to the filter value
- Returns:
true if both event filters match. The matching algorithm is left to the filter event
implementation. For example the Regex event filter will match another filter if
that other filter matches the regex.
Copyright © 2004-2013 XWiki. All Rights Reserved.