Class FileMonitorAdapter

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void onConfigFileChanged()
      A template method which is triggered once observing file is changed.
      void onFileEvent​(java.io.File file, int eventID)  
      void scheduleIfNeed​(java.util.concurrent.ScheduledExecutorService executor, java.io.File file, int refreshInterval, java.util.concurrent.TimeUnit unit)
      Schedule a watch for file changes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MINIMAL_SCHEDULE_INTERVAL

        public static final int MINIMAL_SCHEDULE_INTERVAL
        See Also:
        Constant Field Values
    • Constructor Detail

      • FileMonitorAdapter

        public FileMonitorAdapter()
    • Method Detail

      • scheduleIfNeed

        public void scheduleIfNeed​(java.util.concurrent.ScheduledExecutorService executor,
                                   java.io.File file,
                                   int refreshInterval,
                                   java.util.concurrent.TimeUnit unit)
        Schedule a watch for file changes. If schedule interval less then MINIMAL_SCHEDULE_INTERVAL no tasks will be scheduled
        Parameters:
        executor - a executor
        file - an existing file
        refreshInterval - refresh interval
        unit - a time unit
      • onConfigFileChanged

        public abstract void onConfigFileChanged()
                                          throws OpenAS2Exception
        A template method which is triggered once observing file is changed.
        Throws:
        OpenAS2Exception - - an internally handled error has occurred