public class OIFtpPusher extends AbstractOIFtpPusher
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.
bFailed, DEFAULT_FTP_PORT, DEFAULT_SFTP_PORT, delay, errMesg, filesToFTP, ftpClient, ftpDirectory, ftpExtension, ftpFileType, ftpFilter, ftpHost, ftpPasswd, ftpPort, ftpRunning, ftpTimeInterval, ftpUser, hostsFile, interruptDelay, localDirectory, logger, oinode, passiveMode, sftpUsed, SSH_KNOWN_HOSTS_FILE
Constructor and Description |
---|
OIFtpPusher(LoggerIfc lgr,
java.lang.String localdir,
java.lang.String ftphost,
int ftpport,
java.lang.String ftpuser,
java.lang.String ftppasswd,
java.lang.String ftpdir,
java.lang.String ftpext,
boolean sftpUsed,
java.lang.String hostsFile)
Construct a new
OIFtpPusher to be used within an
OITransport object. |
OIFtpPusher(LoggerIfc lgr,
java.lang.String localdir,
java.lang.String ftphost,
java.lang.String ftpuser,
java.lang.String ftppasswd,
java.lang.String ftpdir,
java.lang.String ftpext,
boolean sftpUsed,
java.lang.String hostsFile)
Construct a new
OIFtpPusher to be used within an
OITransport object. |
Modifier and Type | Method and Description |
---|---|
protected void |
doTransfer()
transfer the files in this method.
|
void |
setInterestedObject(FTPTransferNotificationIfc interestedObject) |
enablePassiveMode, getFileMode, getFiles, getFtpDirectory, getFtpExtension, getFtpHost, getFtpLogin, getFtpPassword, getFtpPort, getFtpTimeInterval, getLocalDirectory, isHealthy, run, setAsciiFileMode, setBinaryFileMode, setFiles, setFtpDirectory, setFtpExtension, setFtpHost, setFtpLogin, setFtpPassword, setFtpPort, setFtpTimeInterval, setLocalDirectory, shutdown
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public OIFtpPusher(LoggerIfc lgr, java.lang.String localdir, java.lang.String ftphost, java.lang.String ftpuser, java.lang.String ftppasswd, java.lang.String ftpdir, java.lang.String ftpext, boolean sftpUsed, java.lang.String hostsFile) throws NodeStartException
OIFtpPusher
to be used within an
OITransport
object. The file transfers will occur
based upon the provided configuration parameters.lgr
- Reference to the log methods of the nodelocaldir
- Local directory containing the files to be
transferredftphost
- Name/IP address of the remote ftp hostftpuser
- Name used to login to the remote hostftppasswd
- Password used to login to the remote hostftpdir
- Remote directory in which to place the filesftpext
- 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 usedhostsFile
- If Sftp is used, need to specify the hosts file
which contains the server finger prints.NodeStartException
public OIFtpPusher(LoggerIfc lgr, java.lang.String localdir, java.lang.String ftphost, int ftpport, java.lang.String ftpuser, java.lang.String ftppasswd, java.lang.String ftpdir, java.lang.String ftpext, boolean sftpUsed, java.lang.String hostsFile) throws NodeStartException
OIFtpPusher
to be used within an
OITransport
object. The file transfers will occur
based upon the provided configuration parameters.lgr
- Reference to the log methods of the nodelocaldir
- Local directory containing the files to be
transferredftphost
- Name/IP address of the remote ftp hostftpport
- FTP port number, default is 21ftpuser
- Name used to login to the remote hostftppasswd
- Password used to login to the remote hostftpdir
- Remote directory in which to place the filesftpext
- 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 usedhostsFile
- If Sftp is used, need to specify the hosts file
which contains the server finger prints.NodeStartException
protected void doTransfer() throws java.io.IOException
AbstractOIFtpPusher
doTransfer
in class AbstractOIFtpPusher
java.io.IOException
public void setInterestedObject(FTPTransferNotificationIfc interestedObject)