FTP Server

com.theorem.ftp
Class FileReceipt

Object
  |
  +--FileReceipt

public abstract class FileReceipt
extends Object


Constructor Summary
FileReceipt()
           
 
Method Summary
abstract  String enterDirectory(String entity, String physDirName, String virtDirName, String configDir, LogMsg log)
          Method called when a directory is entered.
abstract  void getAfter(String entity, String fileName, long byteCount, String configDir, LogMsg log)
          Method called when a file is retrieved from the FTP server.
abstract  String getBefore(String entity, String fileName, String configDir, LogMsg log)
          Method called just before a file is retrieved from the FTP server.
abstract  void putAfter(String entity, String fileName, long byteCount, String configDir, LogMsg log)
          Method called when a file is stored by the FTP server.
abstract  String putBefore(String entity, String fileName, String configDir, LogMsg log)
          Method called just before a file is stored by the FTP server.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReceipt

public FileReceipt()
Method Detail

getBefore

public abstract String getBefore(String entity,
                                 String fileName,
                                 String configDir,
                                 LogMsg log)
Method called just before a file is retrieved from the FTP server.

The method may return a null indicating the file may be downloaded or a status code and information if it cannot. Typically a refusal looks like:
553 Requested action not taken.

Parameters:
entity - Name of the entity downloading the file.
fileName - Physical path of the file retrieved by the FTP server.
configDir - Configuration directory as supplied on the FTP server command line.
log - LogMsg object for logging.
Returns:
Status string, or null if the file may be downloaded.

getAfter

public abstract void getAfter(String entity,
                              String fileName,
                              long byteCount,
                              String configDir,
                              LogMsg log)
Method called when a file is retrieved from the FTP server.

Parameters:
entity - Name of the entity downloading the file.
fileName - Physical path of the file retrieved by the FTP server.
byteCount - Number of bytes downloaded.
configDir - Configuration directory as supplied on the FTP server command line.
log - LogMsg object for logging.

putBefore

public abstract String putBefore(String entity,
                                 String fileName,
                                 String configDir,
                                 LogMsg log)
Method called just before a file is stored by the FTP server.

The method may return a null indicating the file may be uploaded or a status code and information if it cannot. Typically a refusal looks like:
553 Requested action not taken.

Parameters:
entity - Name of the entity uploading the file.
fileName - Physical path of the file stored by the FTP server.
configDir - Configuration directory as supplied on the FTP server command line.
log - Log object for creating log entries, if necessary. This writes to the main server log.
Returns:
Status string, or null if the file may be downloaded.

putAfter

public abstract void putAfter(String entity,
                              String fileName,
                              long byteCount,
                              String configDir,
                              LogMsg log)
Method called when a file is stored by the FTP server.

Parameters:
entity - Name of the entity uploading the file.
fileName - Physical path of the file stored by the FTP server.
byteCount - Number of bytes uploaded.
configDir - Configuration directory as supplied on the FTP server command line.
log - Log object for creating log entries, if necessary. This writes to the main server log.

enterDirectory

public abstract String enterDirectory(String entity,
                                      String physDirName,
                                      String virtDirName,
                                      String configDir,
                                      LogMsg log)
Method called when a directory is entered.

Parameters:
entity - Name of the entity uploading the file.
physDirName - Physical path of the directory.
virtDirName - Virtual path of the directory.
configDir - Configuration directory as supplied on the FTP server command line.
log - Log object for creating log entries, if necessary. This writes to the main server log.
Returns:
Status string, or null if the directory may be entered. This will be something like "450 Requested file action not taken." which will prevent the command from completing or null to continue processing.

FTP Server

Submit a bug report or feature request

Copyright 1998-2001 AXL Software. PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.