Package org.xwiki.observation
Class AbstractThreadEventListener
java.lang.Object
org.xwiki.observation.AbstractThreadEventListener
- All Implemented Interfaces:
EventListener
- Direct Known Subclasses:
WrappedThreadEventListener
Filter events by keeping only events produced by the provided
Thread.- Since:
- 3.2M3
- Version:
- $Id: 50b106ccae4955b72d841da0d42a0aea98d374bc $
-
Field Summary
Fields inherited from interface org.xwiki.observation.EventListener
CACHE_INVALIDATION_DEFAULT_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTheObservationManagercalls this method when an event matches one of the events for which this listener is registered (seeEventListener.getEvents().protected abstract voidonEventInternal(Event event, Object source, Object data) Called when the event has been produce by the properThread.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xwiki.observation.EventListener
getEvents, getName
-
Constructor Details
-
AbstractThreadEventListener
public AbstractThreadEventListener() -
AbstractThreadEventListener
- Parameters:
thread- the thread to match to receive events.
-
-
Method Details
-
onEvent
Description copied from interface:EventListenerTheObservationManagercalls this method when an event matches one of the events for which this listener is registered (seeEventListener.getEvents().- Specified by:
onEventin interfaceEventListener- Parameters:
event- the event triggered. Can be used to differentiate different events if your Object supports several events for example.source- the event source i.e. the object for which the event was triggered. For example this would be the document Object if the event is a document update event.data- some additional and optional data passed that can be acted on.
-
onEventInternal
Called when the event has been produce by the properThread.- Parameters:
event- the event triggered. Can be used to differentiate different events if your Object supports several events for example.source- the event source i.e. the object for which the event was triggered. For example this would be the document Object if the event is a document update event.data- some additional and optional data passed that can be acted on.
-