Package org.xwiki.observation
Class WrappedThreadEventListener
java.lang.Object
org.xwiki.observation.AbstractThreadEventListener
org.xwiki.observation.WrappedThreadEventListener
- All Implemented Interfaces:
EventListener
Wraps a provided
EventListener and filters events by only keeping those coming from the provided
Thread.- Since:
- 3.2M3
- Version:
- $Id: f844184a118edc02ad0fd73a6492cf73769dcd8a $
-
Field Summary
Fields inherited from interface org.xwiki.observation.EventListener
CACHE_INVALIDATION_DEFAULT_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionWrappedThreadEventListener(EventListener listener) WrappedThreadEventListener(EventListener listener, Thread thread) -
Method Summary
Methods inherited from class org.xwiki.observation.AbstractThreadEventListener
onEvent
-
Constructor Details
-
WrappedThreadEventListener
- Parameters:
listener- the wrapped listener- Since:
- 6.0M1
-
WrappedThreadEventListener
- Parameters:
listener- the wrapped listenerthread- the thread to match to receive events
-
-
Method Details
-
getEvents
- Returns:
- the list of events this listener is configured to receive. This listener will be automatically registered
with this list of events against the
ObservationManager. When an event occurs, for each matching event in this list, theEventListener.onEvent(Event, Object, Object)method will be called.
-
getName
- Returns:
- the listener's name. It's a free form text identifying this listener instance in a unique manner. This
name is used for some operations in
ObservationManager.
-
onEventInternal
Description copied from class:AbstractThreadEventListenerCalled when the event has been produce by the properThread.- Specified by:
onEventInternalin classAbstractThreadEventListener- 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.
-