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
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidhandle(ThreadEventHandler handler) static voidignore(ThreadEventListener aListener) static voidlisten(ThreadEventListener aListener) static ThreadEventstatic ThreadEventvoidsend()
-
Constructor Details
-
ThreadEvent
-
-
Method Details
-
handle
-
send
public void send() -
onEnter
-
onLeave
-
listen
-
ignore
-