Package org.nuxeo.runtime.trackers.files
Class FileEvent
- java.lang.Object
-
- org.nuxeo.runtime.services.event.Event
-
- org.nuxeo.runtime.trackers.files.FileEvent
-
public class FileEvent extends Event
Runtime events about transient files which should be deleted once the runtime leave the thread (FileEventTracker
).Producers should use the static
onFile(Object, File, Object)
factory method and fire events by invoking the event'ssend()
method:FileEvent.onFile(source, aFile, aMarker).send();
Consumers should implements the
FileEventHandler
interface and register in theEventService
using theFileEventListener
wrapper:FileEventListener filesListener = new FileEventListener(new FileEventHandler() { @Override public void onFile(File file, Object marker) { ... } }); ... filesListener.install(); ... filesListener.uninstall();
- Since:
- 6.0
- Author:
- Stephane Lacoin at Nuxeo (aka matic)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected File
getFile()
protected Object
getMarker()
void
handle(FileEventHandler handler)
static void
ignore(FileEventListener aListener)
static void
listen(FileEventListener aListener)
static FileEvent
onFile(Object source, File aFile, Object aMarker)
void
send()
-
-
-
Method Detail
-
listen
public static void listen(FileEventListener aListener)
-
ignore
public static void ignore(FileEventListener aListener)
-
send
public void send()
-
handle
public void handle(FileEventHandler handler)
-
-