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 Details

    • start

      public void start() throws Exception
      Specified by:
      start in interface io.dropwizard.lifecycle.Managed
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Specified by:
      stop in interface io.dropwizard.lifecycle.Managed
      Throws:
      Exception
    • onFileCreate

      public void onFileCreate(File file)
      Specified by:
      onFileCreate in interface org.apache.commons.io.monitor.FileAlterationListener
      Overrides:
      onFileCreate in class org.apache.commons.io.monitor.FileAlterationListenerAdaptor
    • onDirectoryCreate

      public void onDirectoryCreate(File directory)
      Specified by:
      onDirectoryCreate in interface org.apache.commons.io.monitor.FileAlterationListener
      Overrides:
      onDirectoryCreate in class org.apache.commons.io.monitor.FileAlterationListenerAdaptor