toolbox.ftp
Interface FTPPutClient

Package class diagram package FTPPutClient
All Known Implementing Classes:
FTPPutClientCommonsImpl

public interface FTPPutClient

Interface that defines a generic FTP client to store files on a remote server.


Method Summary
 void destroy()
          Destroy this client.
 java.lang.String getName()
          Return the name of this client.
 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 putLocalFile(java.lang.String localFileName, java.lang.String remoteFileName)
          Store a single file from the configured local directory and place the file in the configured remote directory.
 void putLocalFiles()
          Store all the files from the configured local directory and place them in the configured remote directory.
 void putLocalFiles(int fileCount)
          Store n number of files from the configured local directory and place them in the configured remote directory.
 

Method Detail

init

void init(java.lang.String name,
          java.util.Map props,
          FTPManager manager)
Initialise this client with a reference to the manager that created it.

Parameters:
name - String containing the name of this client.
props - Map instance containing the client configuration properties.
manager - FTPManager instance that created this client.

getName

java.lang.String getName()
Return the name of this client.

Returns:
String containing the name of this client.

putLocalFile

void putLocalFile(java.lang.String localFileName,
                  java.lang.String remoteFileName)
                  throws FTPException
Store a single file from the configured local directory and place the file in the configured remote directory.

Parameters:
localFileName - String containing the name of the local file.
remoteFileName - String containing the name of the remote file.
Throws:
FTPException - if the file cannot be stored.

putLocalFiles

void putLocalFiles()
                   throws FTPException
Store all the files from the configured local directory and place them in the configured remote directory.

Throws:
FTPException - if the files cannot be retrieved.

putLocalFiles

void putLocalFiles(int fileCount)
                   throws FTPException
Store n number of files from the configured local directory and place them in the configured remote directory.

Parameters:
fileCount - int indicating the maximum number of files to store. Pass -1 to store all files.
Throws:
FTPException - if the files cannot be retrieved.

destroy

void destroy()
Destroy this client.