public class StorageHotFolder
extends java.lang.Object
| Constructor and Description |
|---|
StorageHotFolder(java.io.File _hotFolderDir,
java.io.File storageDir,
java.lang.String ext,
HotFolderListener hfListener)
constructor for a simple queue based hotfolder watcher that is automagically started in its own thread
|
| Modifier and Type | Method and Description |
|---|---|
org.cip4.jdflib.util.hotfolder.StorageHotFolderListener |
addListener(HotFolderListener _hfl,
java.lang.String ext)
add a listener that also stores
|
void |
copyCompleted(java.io.File storedFile,
boolean ok)
copy any files to the ok or error files as set by the folder properties
|
java.io.File |
getHfDirectory() |
int |
getMaxConcurrent() |
protected int |
getRetry() |
int |
getStabilizeTime() |
void |
restart()
restart this hot folder, creates a new listener thread and stops the old one
|
void |
setErrorStorage(java.io.File error)
set the directory for error done
|
void |
setMaxAux(int maxStore)
Setter for maxStore attribute.
|
void |
setMaxConcurrent(int maxConcurrent) |
void |
setMaxStore(int maxStore)
Setter for maxStore attribute.
|
void |
setOKStorage(java.io.File ok)
set the directory for successful done
|
void |
setRetry(int retry) |
void |
setStabilizeTime(int stabilizeTime) |
void |
stop()
stop this hot folder
|
java.lang.String |
toString() |
public StorageHotFolder(java.io.File _hotFolderDir,
java.io.File storageDir,
java.lang.String ext,
HotFolderListener hfListener)
_hotFolderDir - the hot folder directory to watchstorageDir - the storage directory where hot files are moved toext - the comma separated list of file extensions that are moved - if null no filteringhfListener - callback that receives the generated JMF - the location of the stored file will be found in the standard command parameterspublic java.io.File getHfDirectory()
public void stop()
public void restart()
public org.cip4.jdflib.util.hotfolder.StorageHotFolderListener addListener(HotFolderListener _hfl, java.lang.String ext)
_hfl - ext - public void setOKStorage(java.io.File ok)
ok - the local directory for ok files in the input hot folderpublic void copyCompleted(java.io.File storedFile,
boolean ok)
storedFile - ok - public void setErrorStorage(java.io.File error)
error - the local directory for error files in the input hot folderpublic void setMaxStore(int maxStore)
maxStore - the maxStore to setpublic void setMaxAux(int maxStore)
maxStore - the setMaxAux to setpublic void setMaxConcurrent(int maxConcurrent)
maxConcurrent - HotFolder.setMaxConcurrent(int)public void setStabilizeTime(int stabilizeTime)
stabilizeTime - HotFolder.setStabilizeTime(int)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()protected int getRetry()
public void setRetry(int retry)
retry - the retry to set 1= no retrypublic int getMaxConcurrent()
HotFolder.getMaxConcurrent()public int getStabilizeTime()
HotFolder.getStabilizeTime()