Class ThreadEvent
java.lang.Object
org.nuxeo.runtime.services.event.Event
org.nuxeo.runtime.trackers.concurrent.ThreadEvent
- Direct Known Subclasses:
ThreadEvent.EnterEvent
,ThreadEvent.LeaveEvent
Runtime events that be fired once a thread is about to enter in the nuxeo runtime or leave it. Could be used for
cleaning resource such as the
FileEventTracker
. Producers should use the static
onEnter(Object, boolean)
and onLeave(Object)
factory methods and fire events
by invoking the event's send()
method. Consumers should implements the ThreadEventHandler
interface and register it in the EventService
using the ThreadEventListener
wrapper.- Since:
- 6.0
- Author:
- Stephane Lacoin at Nuxeo (aka matic)
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
handle
(ThreadEventHandler handler) static void
ignore
(ThreadEventListener aListener) static void
listen
(ThreadEventListener aListener) static ThreadEvent
static ThreadEvent
void
send()
-
Constructor Details
-
ThreadEvent
-
-
Method Details
-
handle
-
send
public void send() -
onEnter
-
onLeave
-
listen
-
ignore
-