Class OIFtpPusher

All Implemented Interfaces:
Runnable

public class OIFtpPusher extends AbstractOIFtpPusher
This class is intended to be used as a 'plug-in' module for OI Transports to handle the transfer of completed files to a remote host. Once the completed file has been successfully transferred, one of the following will occur:

1) If this object is constructed with a 'transferred' file extension, the file will be renamed with the given extension to indicated it has already been transferred. It will be the responsibility of the node (perhaps in the backup() method) or a process outside of the UDC application to manage the files locally. 2) If a 'transferred' file extension is not provided at the time of this object's construction, the local file will be deleted.

  • Constructor Details

    • OIFtpPusher

      public OIFtpPusher(LoggerIfc lgr, String localdir, String ftphost, String ftpuser, String ftppasswd, String ftpdir, String ftpext, boolean sftpUsed, String hostsFile) throws NodeStartException
      Construct a new OIFtpPusher to be used within an OITransport object. The file transfers will occur based upon the provided configuration parameters.
      Parameters:
      lgr - Reference to the log methods of the node
      localdir - Local directory containing the files to be transferred
      ftphost - Name/IP address of the remote ftp host
      ftpuser - Name used to login to the remote host
      ftppasswd - Password used to login to the remote host
      ftpdir - Remote directory in which to place the files
      ftpext - File extension used to tag the local files as having been transferred. If this parameter is null or zero-length, the local files will be deleted rather than renamed.
      sftpUsed - If Sftp is used
      hostsFile - If Sftp is used, need to specify the hosts file which contains the server finger prints.
      Throws:
      NodeStartException
    • OIFtpPusher

      public OIFtpPusher(LoggerIfc lgr, String localdir, String ftphost, int ftpport, String ftpuser, String ftppasswd, String ftpdir, String ftpext, boolean sftpUsed, String hostsFile) throws NodeStartException
      Construct a new OIFtpPusher to be used within an OITransport object. The file transfers will occur based upon the provided configuration parameters.
      Parameters:
      lgr - Reference to the log methods of the node
      localdir - Local directory containing the files to be transferred
      ftphost - Name/IP address of the remote ftp host
      ftpport - FTP port number, default is 21
      ftpuser - Name used to login to the remote host
      ftppasswd - Password used to login to the remote host
      ftpdir - Remote directory in which to place the files
      ftpext - File extension used to tag the local files as having been transferred. If this parameter is null or zero-length, the local files will be deleted rather than renamed.
      sftpUsed - If Sftp is used
      hostsFile - If Sftp is used, need to specify the hosts file which contains the server finger prints.
      Throws:
      NodeStartException
  • Method Details