Class StorageHotFolder

java.lang.Object
org.cip4.jdflib.util.hotfolder.StorageHotFolder
Direct Known Subclasses:
PollHotFolder, QueueHotFolder

public class StorageHotFolder extends Object
a hotfolder that handles storage of "hotfolded" data
  • Constructor Details

    • StorageHotFolder

      public StorageHotFolder(File _hotFolderDir, File storageDir, String ext, HotFolderListener hfListener)
      constructor for a simple queue based hotfolder watcher that is automagically started in its own thread
      Parameters:
      _hotFolderDir - the hot folder directory to watch
      storageDir - the storage directory where hot files are moved to
      ext - the comma separated list of file extensions that are moved - if null no filtering
      hfListener - callback that receives the generated JMF - the location of the stored file will be found in the standard command parameters
  • Method Details

    • isProcessAux

      public boolean isProcessAux()
    • setProcessAux

      public void setProcessAux(boolean processAux)
    • getHfDirectory

      public File getHfDirectory()
      Returns:
      the hotfolder directory
    • stop

      public void stop()
      stop this hot folder
    • restart

      public void restart()
      restart this hot folder, creates a new listener thread and stops the old one
    • addListener

      public org.cip4.jdflib.util.hotfolder.StorageHotFolderListener addListener(HotFolderListener _hfl, String ext)
      add a listener that also stores
      Parameters:
      _hfl -
      ext -
      Returns:
      the newly added listener
    • getListener

      public org.cip4.jdflib.util.hotfolder.StorageHotFolderListener getListener(int i)
      Parameters:
      i -
      Returns:
    • setOKStorage

      public void setOKStorage(File ok)
      set the directory for successful done
      Parameters:
      ok - the local directory for ok files in the input hot folder
    • copyCompleted

      public void copyCompleted(File storedFile, boolean ok)
      copy any files to the ok or error files as set by the folder properties
      Parameters:
      storedFile -
      ok -
    • copyCompleted

      public void copyCompleted(File storedFile, boolean ok, Throwable t)
      copy any files to the ok or error files as set by the folder properties
      Parameters:
      storedFile -
      ok -
    • setErrorStorage

      public void setErrorStorage(File error)
      set the directory for error done
      Parameters:
      error - the local directory for error files in the input hot folder
    • setMaxStore

      public void setMaxStore(int maxStore)
      Setter for maxStore attribute.
      Parameters:
      maxStore - the maxStore to set
    • setMaxAux

      public void setMaxAux(int maxStore)
      Setter for maxStore attribute.
      Parameters:
      maxStore - the setMaxAux to set
    • setMaxConcurrent

      public void setMaxConcurrent(int maxConcurrent)
      Parameters:
      maxConcurrent -
      See Also:
    • setStabilizeTime

      public void setStabilizeTime(int stabilizeTime)
      Parameters:
      stabilizeTime -
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • getRetry

      protected int getRetry()
      Returns:
      the retry
    • setRetry

      public void setRetry(int retry)
      Parameters:
      retry - the retry to set 1= no retry
    • getMaxConcurrent

      public int getMaxConcurrent()
      Returns:
      See Also:
    • getStabilizeTime

      public int getStabilizeTime()
      Returns:
      See Also:
    • isSynchronous

      public boolean isSynchronous()
    • setSynchronous

      public void setSynchronous(boolean synchronous)
    • setMaxCheck

      public void setMaxCheck(int maxCheck)