Class QueueHotFolderListenerImpl

java.lang.Object
org.cip4.jdflib.util.hotfolder.QueueHotFolderListenerImpl
All Implemented Interfaces:
HotFolderListener

public class QueueHotFolderListenerImpl extends Object implements HotFolderListener
hot folder listener that submits to a queue
  • Field Details

    • log

      protected final org.apache.commons.logging.Log log
  • Constructor Details

    • QueueHotFolderListenerImpl

      public QueueHotFolderListenerImpl(QueueHotFolderListener qhfl, JDFJMF jmf)
      Parameters:
      qhfl -
      jmf - the list of commands - if null create submit + resubmit
  • Method Details

    • hotFile

      public boolean hotFile(File hotFile)
      Description copied from interface: HotFolderListener
      this interface function is called whenever a new or modified file has stabilized in the hotFolder note: make sure to close all streams so that deleting temp files does not fail
      Specified by:
      hotFile in interface HotFolderListener
      Parameters:
      hotFile -
      Returns:
      true if all went well, else false
      See Also:
    • processSingle

      public boolean processSingle(JDFNode jdfRoot, File hotFile, int iMessage)
      Parameters:
      jdfRoot -
      hotFile -
      iMessage -
      Returns:
    • extractReturnParams

      protected void extractReturnParams(String stringURL, JDFCommand newCommand, JDFNode jdfRoot)
      overwrite this method in case you want to customize the hotfolder for returnqueueentryparams and paramtetrizing the ReturnQueueEntryParams template is insufficient
      Parameters:
      stringURL - the file url of the hotfolder jdf in the local storage directory (NOT the hf)
      newCommand - the command that was generated from the template
      jdfRoot - the root jdf node of the dropped file
    • extractSubmitParams

      protected void extractSubmitParams(String stringURL, JDFCommand newCommand, JDFNode jdfRoot)
      overwrite this method in case you want to customize the hotfolder for submitqueentry and parametrizing the QueueSubmissionParams template is insufficient
      Parameters:
      stringURL - the file url of the hotfolder jdf in the local storage directory (NOT the hf)
      newCommand - the command that was generated from the template
      jdfRoot - the root jdfnode of the dropped file
    • extractResubmitParams

      protected void extractResubmitParams(String stringURL, JDFCommand newCommand, JDFNode jdfRoot)
      overwrite this method in case you want to customize the hotfolder for submitqueentry and parametrizing the QueueSubmissionParams template is insufficient
      Parameters:
      stringURL - the file url of the hotfolder jdf in the local storage directory (NOT the hf)
      newCommand - the command that was generated from the template
      jdfRoot - the root jdfnode of the dropped file
    • getResubmitQueueEntry

      protected String getResubmitQueueEntry(JDFNode jdfRoot)
      hack: assume that qeid=jobID unless we have a generalID
      Parameters:
      jdfRoot -
      Returns: