Class FileNodeListener


public class FileNodeListener extends NodeListener
A NodeList that monitors the change of a file.
Author:
DigitalSonic
  • Constructor Details

    • FileNodeListener

      public FileNodeListener()
  • Method Details

    • init

      public void init()
      Start a Scheduler to check the specified file.
      Overrides:
      init in class NodeListener
      See Also:
    • refresh

      public List<NodeEvent> refresh()
      Load the properties file and diff with the stored Properties.
      Specified by:
      refresh in class NodeListener
      Returns:
      A List of the modification
    • destroy

      public void destroy()
      Close the ScheduledExecutorService.
      Specified by:
      destroy in class NodeListener
    • getIntervalSeconds

      public int getIntervalSeconds()
    • setIntervalSeconds

      public void setIntervalSeconds(int intervalSeconds)
    • getFile

      public String getFile()
    • setFile

      public void setFile(String file)