Package org.cip4.jdflib.util.hotfolder
Class QueueHotFolderListenerImpl
- java.lang.Object
-
- org.cip4.jdflib.util.hotfolder.QueueHotFolderListenerImpl
-
- All Implemented Interfaces:
HotFolderListener
public class QueueHotFolderListenerImpl extends java.lang.Object implements HotFolderListener
hot folder listener that submits to a queue
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Loglog
-
Constructor Summary
Constructors Constructor Description QueueHotFolderListenerImpl(QueueHotFolderListener qhfl, JDFJMF jmf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidextractResubmitParams(java.lang.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 insufficientprotected voidextractReturnParams(java.lang.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 insufficientprotected voidextractSubmitParams(java.lang.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 insufficientprotected java.lang.StringgetResubmitQueueEntry(JDFNode jdfRoot)hack: assume that qeid=jobID unless we have a generalIDbooleanhotFile(java.io.File hotFile)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 failbooleanprocessSingle(JDFNode jdfRoot, java.io.File hotFile, int iMessage)
-
-
-
Constructor Detail
-
QueueHotFolderListenerImpl
public QueueHotFolderListenerImpl(QueueHotFolderListener qhfl, JDFJMF jmf)
- Parameters:
qhfl-jmf- the list of commands - if null create submit + resubmit
-
-
Method Detail
-
hotFile
public boolean hotFile(java.io.File hotFile)
Description copied from interface:HotFolderListenerthis 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:
hotFilein interfaceHotFolderListener- Parameters:
hotFile-- Returns:
- true if all went well, else false
- See Also:
HotFolderListener.hotFile(java.io.File)
-
processSingle
public boolean processSingle(JDFNode jdfRoot, java.io.File hotFile, int iMessage)
- Parameters:
jdfRoot-hotFile-iMessage-- Returns:
-
extractReturnParams
protected void extractReturnParams(java.lang.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 templatejdfRoot- the root jdf node of the dropped file
-
extractSubmitParams
protected void extractSubmitParams(java.lang.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 templatejdfRoot- the root jdfnode of the dropped file
-
extractResubmitParams
protected void extractResubmitParams(java.lang.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 templatejdfRoot- the root jdfnode of the dropped file
-
getResubmitQueueEntry
protected java.lang.String getResubmitQueueEntry(JDFNode jdfRoot)
hack: assume that qeid=jobID unless we have a generalID- Parameters:
jdfRoot-- Returns:
-
-