public class FileEvent extends Event
FileEventTracker).
Producers should use the static onFile(Object, File, Object) factory method and fire events by
invoking the event's send() method:
FileEvent.onFile(source, aFile, aMarker).send();
Consumers should implements the FileEventHandler interface and register in the EventService using the
FileEventListener wrapper:
FileEventListener filesListener = new FileEventListener(new FileEventHandler() {
@Override
public void onFile(File file, Object marker) {
...
}
});
...
filesListener.install();
...
filesListener.uninstall();
| Modifier | Constructor and Description |
|---|---|
protected |
FileEvent(Object source,
File aFile,
Object aMarker) |
| Modifier and Type | Method and 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() |
public static void listen(FileEventListener aListener)
public static void ignore(FileEventListener aListener)
public void send()
public void handle(FileEventHandler handler)
Copyright © 2019 Nuxeo. All rights reserved.