public class StorageHotFolder extends Object
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
org.cip4.jdflib.util.hotfolder.StorageHotFolderListener |
addListener(HotFolderListener _hfl,
String ext)
add a listener that also stores
|
void |
copyCompleted(File storedFile,
boolean ok)
copy any files to the ok or error files as set by the folder properties
|
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(File error)
set the directory for error done
|
void |
setMaxConcurrent(int maxConcurrent) |
void |
setMaxStore(int maxStore)
Setter for maxStore attribute.
|
void |
setOKStorage(File ok)
set the directory for successful done
|
void |
setRetry(int retry) |
void |
setStabilizeTime(int stabilizeTime) |
void |
stop()
stop this hot folder
|
String |
toString() |
public StorageHotFolder(File _hotFolderDir, File storageDir, 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 File getHfDirectory()
public void stop()
public void restart()
public org.cip4.jdflib.util.hotfolder.StorageHotFolderListener addListener(HotFolderListener _hfl, String ext)
_hfl - ext - public void setOKStorage(File ok)
ok - the local directory for ok files in the input hot folderpublic void copyCompleted(File storedFile, boolean ok)
storedFile - ok - public void setErrorStorage(File error)
error - the local directory for error files in the input hot folderpublic void setMaxStore(int maxStore)
maxStore - the maxStore to setpublic void setMaxConcurrent(int maxConcurrent)
maxConcurrent - HotFolder.setMaxConcurrent(int)public void setStabilizeTime(int stabilizeTime)
stabilizeTime - HotFolder.setStabilizeTime(int)public String toString()
toString in class ObjectObject.toString()protected int getRetry()
public void setRetry(int retry)
retry - the retry to setpublic int getMaxConcurrent()
HotFolder.getMaxConcurrent()public int getStabilizeTime()
HotFolder.getStabilizeTime()Copyright © 2018. All rights reserved.