|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.io.FolderMonitor
public class FolderMonitor
This class will monitor a specified folder for activity.
Field Summary | |
---|---|
static int |
FTP_TO_SPECIFIED_DESTINATION
|
static int |
GATHER_FILES_FOR_PICKUP
|
static java.lang.String |
HOST
|
static java.lang.String |
LIMIT
|
static java.lang.String |
PASSWORD
|
static java.lang.String |
PICKUP
|
static java.lang.String |
TEXTMODE
|
static java.lang.String |
USER
|
Constructor Summary | |
---|---|
FolderMonitor(java.io.File aFolder,
long aDelay,
int aOperation,
java.util.HashMap aParams)
This constructor allows the creation of a FolderMonitor that will take care of performing a specified action, with the specified parameters, whenever a new file is found. |
|
FolderMonitor(java.io.File aFolder,
long aDelay,
int aOperation,
java.util.HashMap aParams,
org.apache.log4j.Logger aLogger)
This constructor allows the creation of a FolderMonitor that will take care of performing a specified action, with the specified parameters, whenever a new file is found. |
|
FolderMonitor(java.io.File aFolder,
long aDelay,
java.lang.String aFilter,
int aOperation,
java.util.HashMap aParams)
This constructor allows the creation of a FolderMonitor for the specified filtered files that will take care of performing a specified action, with the specified parameters, whenever a new file is found. |
|
FolderMonitor(java.io.File aFolder,
long aDelay,
java.lang.String aFilter,
int aOperation,
java.util.HashMap aParams,
org.apache.log4j.Logger aLogger)
This constructor allows the creation of a FolderMonitor for the specified filtered files that will take care of performing a specified action, with the specified parameters, whenever a new file is found. |
Method Summary | |
---|---|
boolean |
isRunning()
This method can be consutled to find put whether the monitor is running. |
static void |
main(java.lang.String[] args)
Main method starting the foldermonitor that looks for changes to a monitored folder. |
void |
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
void |
signalStop()
This method can be used to signal the monitor to halt its monitoring. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HOST
public static final java.lang.String USER
public static final java.lang.String PASSWORD
public static final java.lang.String TEXTMODE
public static final java.lang.String PICKUP
public static final java.lang.String LIMIT
public static final int FTP_TO_SPECIFIED_DESTINATION
public static final int GATHER_FILES_FOR_PICKUP
Constructor Detail |
---|
public FolderMonitor(java.io.File aFolder, long aDelay, int aOperation, java.util.HashMap aParams)
aFolder
- File istance with the folder to check.aDelay
- long with the minimal delay in milliseconds between each folder check.aOperation
- int with the code for the operation to perform
(use only constants defined on this class).aParams
- HashMap with the necessary parameters for the operation.public FolderMonitor(java.io.File aFolder, long aDelay, int aOperation, java.util.HashMap aParams, org.apache.log4j.Logger aLogger)
aFolder
- File istance with the folder to check.aDelay
- long with the minimal delay in milliseconds between each folder check.aOperation
- int with the code for the operation to perform
(use only constants defined on this class).aParams
- HashMap with the necessary parameters for the operation.aLogger
- Logger for messages from this class.public FolderMonitor(java.io.File aFolder, long aDelay, java.lang.String aFilter, int aOperation, java.util.HashMap aParams)
aFolder
- File instance with the folder to check.aDelay
- long with the minimal delay in milliseconds between each folder check.aFilter
- String to filter the files in the folder through.aOperation
- int with the code for the operation to perform
(use only constants defined on this class).aParams
- HashMap with the necessary parameters for the operation.public FolderMonitor(java.io.File aFolder, long aDelay, java.lang.String aFilter, int aOperation, java.util.HashMap aParams, org.apache.log4j.Logger aLogger)
aFolder
- File instance with the folder to check.aDelay
- long with the minimal delay in milliseconds between each folder check.aFilter
- String to filter the files in the folder through.aOperation
- int with the code for the operation to perform
(use only constants defined on this class).aParams
- HashMap with the necessary parameters for the operation.aLogger
- Logger for messages from this class.Method Detail |
---|
public void run()
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface java.lang.Runnable
Thread.run()
public void signalStop()
public boolean isRunning()
public static void main(java.lang.String[] args)
args
- start-up arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |