javatools.ftp
Class Ftp

java.lang.Object
  |
  +--javatools.ftp.Ftp

public class Ftp
extends java.lang.Object


Field Summary
(package private)  FTPClient ftpClient
           
 
Constructor Summary
Ftp(java.lang.String sHost, java.lang.String sUserID, java.lang.String sPassword)
          Constructs/Creates an FTP Session with a Nominated Host
 
Method Summary
 void deleteFile(java.lang.String sDirectory, java.lang.String sFile)
          Delete a File from the Nominated Host
 java.util.Vector directoryList(java.lang.String sDirectory)
          Retrieves a Directory List from the nominated Host
 void getFile(java.lang.String sDirectory, java.lang.String sFile, FTPVisitor ftpVisitor)
          Process a File from the Nominated Host
 void log(java.lang.String sMessage)
          Log Writer
 void sendCommand(java.lang.String sCommand)
          Send an FTP Directory (MKD - Make a directory)
 void sendFile(java.lang.String sDirectory, java.lang.String sFile, FTPSender ftpSender)
          Send a File to the Nominated Host
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ftpClient

FTPClient ftpClient
Constructor Detail

Ftp

public Ftp(java.lang.String sHost,
           java.lang.String sUserID,
           java.lang.String sPassword)
    throws java.lang.Exception
Constructs/Creates an FTP Session with a Nominated Host

Parameters:
sHost - The name of the Host
sUserID - The FTP Userid
sPassword - The FTP Password
Throws:
java.lang.Exception - if things go wrong
Method Detail

directoryList

public java.util.Vector directoryList(java.lang.String sDirectory)
                               throws java.lang.Exception
Retrieves a Directory List from the nominated Host

Parameters:
sDirectory - the name of the Nominated Directory
Throws:
java.lang.Exception - if things go wrong

getFile

public void getFile(java.lang.String sDirectory,
                    java.lang.String sFile,
                    FTPVisitor ftpVisitor)
             throws java.lang.Exception
Process a File from the Nominated Host

Parameters:
sDirectory - the name of the Nominated Directory
sFile - the name of the File within the Directory
ftpVisitor - factory to process the File
Throws:
java.lang.Exception - if things go wrong

sendFile

public void sendFile(java.lang.String sDirectory,
                     java.lang.String sFile,
                     FTPSender ftpSender)
              throws java.lang.Exception
Send a File to the Nominated Host

Parameters:
sDirectory - the name of the Nominated Directory
sFile - the name of the File within the Directory
ftpSender - factory to send the File
Throws:
java.lang.Exception - if things go wrong

deleteFile

public void deleteFile(java.lang.String sDirectory,
                       java.lang.String sFile)
                throws java.lang.Exception
Delete a File from the Nominated Host

Parameters:
sDirectory - the name of the Nominated Directory
sFile - the name of the File within the Directory
Throws:
java.lang.Exception - if things go wrong

sendCommand

public void sendCommand(java.lang.String sCommand)
                 throws java.lang.Exception
Send an FTP Directory (MKD - Make a directory)

Parameters:
sCommand - the Command
Throws:
java.lang.Exception - if things go wrong

log

public void log(java.lang.String sMessage)
Log Writer