Modifier and Type | Field and Description |
---|---|
static int |
FTP_TO_SPECIFIED_DESTINATION |
static int |
GATHER_FILES_FOR_PICKUP |
static String |
HOST |
static String |
LIMIT |
static String |
PASSWORD |
static String |
PICKUP |
static String |
TEXTMODE |
static String |
USER |
Constructor and Description |
---|
FolderMonitor(File aFolder,
long aDelay,
int aOperation,
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(File aFolder,
long aDelay,
int aOperation,
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(File aFolder,
long aDelay,
String aFilter,
int aOperation,
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(File aFolder,
long aDelay,
String aFilter,
int aOperation,
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning()
This method can be consulted to find out whether the monitor is running.
|
static void |
main(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.
|
public static final String HOST
public static final String USER
public static final String PASSWORD
public static final String TEXTMODE
public static final String PICKUP
public static final String LIMIT
public static final int FTP_TO_SPECIFIED_DESTINATION
public static final int GATHER_FILES_FOR_PICKUP
public FolderMonitor(File aFolder, long aDelay, int aOperation, 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(File aFolder, long aDelay, int aOperation, 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(File aFolder, long aDelay, String aFilter, int aOperation, 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(File aFolder, long aDelay, String aFilter, int aOperation, 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.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 Runnable
Thread.run()
public void signalStop()
public boolean isRunning()
public static void main(String[] args)
args
- start-up argumentsCopyright © 2016. All rights reserved.