Package org.oddjob.io

Class PathWatchEvents

java.lang.Object
org.oddjob.io.PathWatchEvents
All Implemented Interfaces:
Outbound<Path>, Service, Stoppable

public class PathWatchEvents extends Object implements Outbound<Path>, Service
Watch a directory for files and changes.
Author:
rob
  • Constructor Details

    • PathWatchEvents

      public PathWatchEvents()
  • Method Details

    • start

      public void start()
      Description copied from interface: Service
      Start the service.
      Specified by:
      start in interface Service
    • stop

      public void stop()
      Description copied from interface: Stoppable
      Stop executing. This method should not return until the Stoppable has actually stopped.
      Specified by:
      stop in interface Stoppable
    • doStartWithException

      protected Restore doStartWithException(Consumer<? super Path> consumer) throws IOException
      Throws:
      IOException
    • getDir

      public Path getDir()
    • setDir

      public void setDir(Path dir)
    • getKinds

      public String getKinds()
    • setKinds

      public void setKinds(String kinds)
    • getFilter

      public String getFilter()
    • setFilter

      public void setFilter(String filter)
    • getTo

      public Consumer<? super Path> getTo()
    • setTo

      public void setTo(Consumer<? super Path> to)
      Description copied from interface: Outbound
      Set the out bound destination.
      Specified by:
      setTo in interface Outbound<Path>
      Parameters:
      to -
    • isNewOnly

      public boolean isNewOnly()
    • setNewOnly

      public void setNewOnly(boolean newOnly)