public class HotFolder extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
HotFolder.ExtensionListener
simple container class that retains the last known mod date of a file
|
protected class |
HotFolder.FileTime
simple container class that retains the last known mod date of a file
|
Modifier and Type | Field and Description |
---|---|
protected Vector<HotFolder.ExtensionListener> |
hfl |
int |
stabilizeTime
the time in milliseconds to wait for stabilization
|
Constructor and Description |
---|
HotFolder(File _dir)
Deprecated.
- use the 3 parameter version
|
HotFolder(File _dir,
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,
String ext) |
static int |
getDefaultStabilizeTime() |
File |
getDir() |
int |
getMaxConcurrent() |
int |
getStabilizeTime() |
void |
restart()
restart the thread
|
static void |
setDefaultStabilizeTime(int defaultStabilizeTime) |
void |
setMaxConcurrent(int maxConcurrent) |
void |
setStabilizeTime(int stabilizeTime) |
void |
stop()
stop this thread;
|
String |
toString() |
public int stabilizeTime
protected final Vector<HotFolder.ExtensionListener> hfl
@Deprecated public HotFolder(File _dir)
_dir
- the Directory to watchpublic HotFolder(File _dir, 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 void setMaxConcurrent(int maxConcurrent)
maxConcurrent
- the maxConcurrent to setpublic int getMaxConcurrent()
public File getDir()
public void addListener(HotFolderListener _hfl, String ext)
_hfl
- ext
- public void restart()
public void stop()
public String toString()
toString
in class Object
Object.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 setCopyright © 2018. All rights reserved.