public class HotFolder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<org.cip4.jdflib.util.hotfolder.ExtensionListener> |
hfl |
int |
stabilizeTime
the time in milliseconds to wait for stabilization
|
| Constructor and Description |
|---|
HotFolder(java.io.File _dir)
Deprecated.
- use the 3 parameter version
|
HotFolder(java.io.File _dir,
java.lang.String ext,
HotFolderListener _hfl)
constructor for a simple hotfolder watcher that is automagically started in its own thread
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(HotFolderListener _hfl,
java.lang.String ext) |
boolean |
equals(java.lang.Object obj) |
static int |
getDefaultStabilizeTime() |
java.io.File |
getDir() |
org.cip4.jdflib.util.hotfolder.ExtensionListener |
getListener(int i) |
int |
getMaxCheck() |
int |
getMaxConcurrent() |
int |
getStabilizeTime() |
int |
hashCode() |
void |
restart()
restart the thread
|
static void |
setDefaultStabilizeTime(int defaultStabilizeTime) |
void |
setMaxCheck(int maxCheck) |
void |
setMaxConcurrent(int maxConcurrent) |
void |
setStabilizeTime(int stabilizeTime) |
void |
stop()
stop this thread;
|
java.lang.String |
toString() |
public int stabilizeTime
protected final java.util.ArrayList<org.cip4.jdflib.util.hotfolder.ExtensionListener> hfl
@Deprecated public HotFolder(java.io.File _dir)
_dir - the Directory to watchpublic HotFolder(java.io.File _dir,
java.lang.String ext,
HotFolderListener _hfl)
_dir - the Directory to watchext - the extension filter - case is ignored and lists of extensions may be specified as a comma separated list e.g. ".txt,.xml"_hfl - the listener callbackpublic int getMaxCheck()
public void setMaxCheck(int maxCheck)
public void setMaxConcurrent(int maxConcurrent)
maxConcurrent - the maxConcurrent to set note will only addpublic org.cip4.jdflib.util.hotfolder.ExtensionListener getListener(int i)
i - public int getMaxConcurrent()
public java.io.File getDir()
public void addListener(HotFolderListener _hfl, java.lang.String ext)
_hfl - ext - public void restart()
public void stop()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public static int getDefaultStabilizeTime()
public static void setDefaultStabilizeTime(int defaultStabilizeTime)
defaultStabilizeTime - the defaultStabilizeTime to setpublic int getStabilizeTime()
public void setStabilizeTime(int stabilizeTime)
stabilizeTime - the stabilizeTime to set in milliseconds - we always ensure at least 2000 because some OS have 1000 file modified garnularitypublic int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)