org.xwiki.observation.event
Class AllEvent

java.lang.Object
  extended by org.xwiki.observation.event.AllEvent
All Implemented Interfaces:
Event

public final class AllEvent
extends java.lang.Object
implements Event

Special event matcher used by a listener which need to listened to all possible events.

Version:
$Id: AllEvent.java 31147 2010-09-16 14:06:34Z tmortagne $

Field Summary
static Event ALLEVENT
          Unique instance of the event matcher.
 
Method Summary
 boolean matches(java.lang.Object otherEvent)
          Compares two events to see if they match, meaning that a listener that registered to receive notifications like referenceEvent will be notified of any occuring event for which referenceEvent.matches(occuringEvent) will return true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLEVENT

public static final Event ALLEVENT
Unique instance of the event matcher.

Method Detail

matches

public boolean matches(java.lang.Object otherEvent)
Compares two events to see if they match, meaning that a listener that registered to receive notifications like referenceEvent will be notified of any occuring event for which referenceEvent.matches(occuringEvent) will return true. The matching algorithm depends on the event implementation. For example for Document events two events match if they implement the same event class and if their EventFilter match. Note that the implementation is left open in order to cater for all the possible ways this Observation component can be used.

Specified by:
matches in interface Event
Parameters:
otherEvent - the occuring event matched against the current object
Returns:
true if the passed event matches this event, false otherwise.
See Also:
Event.matches(java.lang.Object)


Copyright © 2004-2011 XWiki. All Rights Reserved.