Package nl.knaw.dans.lib.util.inbox
Class Inbox
java.lang.Object
org.apache.commons.io.monitor.FileAlterationListenerAdaptor
nl.knaw.dans.lib.util.inbox.Inbox
- All Implemented Interfaces:
io.dropwizard.lifecycle.Managed
,org.apache.commons.io.monitor.FileAlterationListener
public class Inbox
extends org.apache.commons.io.monitor.FileAlterationListenerAdaptor
implements io.dropwizard.lifecycle.Managed
An inbox is a directory that is monitored for new files. When a new file is detected, a task is created to process the file.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onDirectoryCreate
(File directory) void
onFileCreate
(File file) void
start()
void
stop()
Methods inherited from class org.apache.commons.io.monitor.FileAlterationListenerAdaptor
onDirectoryChange, onDirectoryDelete, onFileChange, onFileDelete, onStart, onStop
-
Method Details
-
start
- Specified by:
start
in interfaceio.dropwizard.lifecycle.Managed
- Throws:
Exception
-
stop
- Specified by:
stop
in interfaceio.dropwizard.lifecycle.Managed
- Throws:
Exception
-
onFileCreate
- Specified by:
onFileCreate
in interfaceorg.apache.commons.io.monitor.FileAlterationListener
- Overrides:
onFileCreate
in classorg.apache.commons.io.monitor.FileAlterationListenerAdaptor
-
onDirectoryCreate
- Specified by:
onDirectoryCreate
in interfaceorg.apache.commons.io.monitor.FileAlterationListener
- Overrides:
onDirectoryCreate
in classorg.apache.commons.io.monitor.FileAlterationListenerAdaptor
-