|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.ftp.FTPGetClientCommonsImpl
public class FTPGetClientCommonsImpl
Implementation of the FTPGetClient interface that employs the Apache Commons Net FTP package.
Constructor Summary | |
---|---|
FTPGetClientCommonsImpl()
Default constructor. |
Method Summary | |
---|---|
void |
destroy()
Destroy this client. |
java.lang.String |
getName()
Return the name of this client. |
void |
getRemoteFile(java.lang.String fileName)
Retrieve a single file from the configured remote directory and place the file in the configured local directory. |
void |
getRemoteFiles()
Retrieve all the files from the configured remote directory and place them in the configured local directory. |
void |
getRemoteFiles(int fileCount)
Retrieve n number of files from the configured remote directory and place them in the configured local directory. |
void |
init(java.lang.String name,
java.util.Map props,
FTPManager manager)
Initialise this client with a reference to the manager that created it. |
void |
setFTPGetListener(FTPGetListener listener)
Set the listener that must be used by this client to process downloaded files. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTPGetClientCommonsImpl()
Method Detail |
---|
public void init(java.lang.String name, java.util.Map props, FTPManager manager)
init
in interface FTPGetClient
name
- Sting containing the name of this client.props
- Map instance containing the client configuration
properties.manager
- FTPManager instance that created this client.public java.lang.String getName()
getName
in interface FTPGetClient
public void setFTPGetListener(FTPGetListener listener)
setFTPGetListener
in interface FTPGetClient
listener
- FTPGetListener implementation that must be used
to process downloaded files.public void getRemoteFile(java.lang.String fileName) throws FTPException
A FTPGetEvent is delivered to the configured listener.
getRemoteFile
in interface FTPGetClient
fileName
- String containing the name of the remote file.
FTPException
- if the file cannot be retrieved.public void getRemoteFiles() throws FTPException
The FTPGetEvent(s) is delivered to the configured listener depending on the configured event mode.
getRemoteFiles
in interface FTPGetClient
FTPException
- if the files cannot be retrieved.public void getRemoteFiles(int fileCount) throws FTPException
The FTPGetEvent(s) is delivered to the configured listener depending on the configured event mode.
getRemoteFiles
in interface FTPGetClient
fileCount
- int indicating the maximum number of files that
may be retrieved. Pass -1 to retrieve all files.
FTPException
- if the files cannot be retrieved.public void destroy()
destroy
in interface FTPGetClient
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |