public class WrappedThreadEventListener extends AbstractThreadEventListener
EventListener and filters events by only keeping those coming from the provided
Thread.| Constructor and Description |
|---|
WrappedThreadEventListener(EventListener listener)
|
WrappedThreadEventListener(EventListener listener,
Thread thread) |
| Modifier and Type | Method and Description |
|---|---|
List<Event> |
getEvents() |
String |
getName() |
protected void |
onEventInternal(Event event,
Object source,
Object data)
Called when the event has been produce by the proper
Thread. |
onEventpublic WrappedThreadEventListener(EventListener listener)
listener - the wrapped listenerpublic WrappedThreadEventListener(EventListener listener, Thread thread)
listener - the wrapped listenerthread - the thread to match to receive eventspublic List<Event> getEvents()
ObservationManager. When an event occurs, for each matching
event in this list, the EventListener.onEvent(Event, Object, Object) method will be called.public String getName()
ObservationManager.protected void onEventInternal(Event event, Object source, Object data)
AbstractThreadEventListenerThread.onEventInternal in class AbstractThreadEventListenerevent - 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.Copyright © 2004–2016 XWiki. All rights reserved.