public abstract class AbstractThreadEventListener extends Object implements EventListener
Thread
.Constructor and Description |
---|
AbstractThreadEventListener()
|
AbstractThreadEventListener(Thread thread) |
Modifier and Type | Method and Description |
---|---|
void |
onEvent(Event event,
Object source,
Object data)
The
ObservationManager calls this method when an event matches one of the events
for which this listener is registered (see EventListener.getEvents() . |
protected abstract void |
onEventInternal(Event event,
Object source,
Object data)
Called when the event has been produce by the proper
Thread . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEvents, getName
public AbstractThreadEventListener()
public AbstractThreadEventListener(Thread thread)
thread
- the thread to match to receive events.public void onEvent(Event event, Object source, Object data)
EventListener
ObservationManager
calls this method when an event matches one of the events
for which this listener is registered (see EventListener.getEvents()
.onEvent
in interface EventListener
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.protected abstract void onEventInternal(Event event, Object source, Object data)
Thread
.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.Copyright © 2004–2021 XWiki. All rights reserved.