javazoom.transfer.client.ftp
Class FTPUploadTransfer

java.lang.Object
  extended by javazoom.transfer.client.core.AbstractTransferController
      extended by javazoom.transfer.client.ftp.FTPTransfer
          extended by javazoom.transfer.client.ftp.FTPUploadTransfer
All Implemented Interfaces:
java.lang.Runnable, TransferController

public class FTPUploadTransfer
extends FTPTransfer
implements java.lang.Runnable

This class implements a TransferController for FTP protocol. It relies on Commons-Net for FTP commands.


Field Summary
static java.lang.String DELETEONFAIL
           
static java.lang.String NOTIFYRELATIVEFILENAME
           
static java.lang.String RELATIVEFILENAME
           
static java.lang.String RESUMECOMMAND
           
static java.lang.String SELECTEDFULLFILENAME
           
 
Fields inherited from class javazoom.transfer.client.ftp.FTPTransfer
ACCOUNT, ACCOUNTCREATION, ACCOUNTPWD, DEPRECATEDPASSWORD, DEPRECATEDURL, DEPRECATEDUSERNAME, DISABLEAUTH, FTPSESSION, FTPSMODE, FTPSPROT, PASV, REMOTEVERIFICATION, SITECOMMAND, targetURL, TRANSFERTYPE, wd, WEAKSSL
 
Fields inherited from class javazoom.transfer.client.core.AbstractTransferController
BUFFERSIZE, GZIPEXTENSION, ZIPEXTENSION
 
Fields inherited from interface javazoom.transfer.client.core.TransferController
COMPLETED_STATUS, MAX_AUTH_ATTEMPTS, RUNNING_STATUS, WAITING_STATUS
 
Constructor Summary
FTPUploadTransfer()
          This class implements FTP transfer.
 
Method Summary
 void begin()
          Start upload thread.
 void cancel()
          Cancel current upload by closing inputstream.
 java.lang.Object execute()
          NOT IMPLEMENTED for FTP UPLOAD transfer.
 void init()
          Inits FTP transfer (SSL Factory ...)
 void run()
          Main loop
protected  void transfer(java.io.File currentfile, java.util.HashMap meta)
          Upload current file with optional additional parameters.
 
Methods inherited from class javazoom.transfer.client.ftp.FTPTransfer
connect, FTPConnect, FTPDisconnect, FTPDisconnect, getClient, makeAndChangeDirectory, notifyProtocolListeners, registerSSLSocketFactory
 
Methods inherited from class javazoom.transfer.client.core.AbstractTransferController
addChecksumListener, addCompressListener, addFilterListener, addProtocolListener, addSplitListener, addTransferListener, authenticate, checksumCompletedNotification, checksumStartedNotification, checkZipMaxSize, cleanFilter, compress, compress, compressFolder, compressingNotification, compressionFailedNotification, computeChecksum, executeFilter, getAllowedSourceFiles, getAuthentication, getBlackList, getChecksumListeners, getChunks, getChunkSize, getCompressListeners, getCRC32, getEncoding, getExt, getFilter, getFilterImpl, getFilterListeners, getHidden, getLastChunkSize, getLong, getMaxDepth, getMaxFiles, getMaxSize, getMD5, getMinSize, getOverwrite, getParameters, getParamFile, getPassword, getPolicy, getProtocolListeners, getRawConf, getResume, getRootDir, getServerUrl, getSource, getSplitListeners, getStatus, getTarget, getTemplate, getTimeOut, getTmpDir, getTmpFolder, getTransferListeners, getUsername, getWhiteList, getZipFolder, getZipIgnoreList, getZipMaxSize, getZipOnFly, hexDump, isAllowed, isThreaded, recurse, recursiveCompress, removeChecksumListener, removeCompressListener, removeFilterListener, removeProtocolListener, removeSplitListener, removeTransferListener, rename, setAuthentication, setBlackList, setChunkSize, setEncoding, setExt, setFilter, setFilterImpl, setHidden, setMaxDepth, setMaxFiles, setMaxSize, setMinSize, setOverwrite, setParameters, setParamFile, setPassword, setPolicy, setRawConf, setResume, setRootDir, setServerUrl, setSource, setStatus, setTarget, setTemplate, setThreaded, setTimeOut, setTmpDir, setUsername, setWhiteList, setZipFolder, setZipIgnoreList, setZipMaxSize, setZipOnFly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELATIVEFILENAME

public static java.lang.String RELATIVEFILENAME

NOTIFYRELATIVEFILENAME

public static java.lang.String NOTIFYRELATIVEFILENAME

SELECTEDFULLFILENAME

public static java.lang.String SELECTEDFULLFILENAME

DELETEONFAIL

public static java.lang.String DELETEONFAIL

RESUMECOMMAND

public static java.lang.String RESUMECOMMAND
Constructor Detail

FTPUploadTransfer

public FTPUploadTransfer()
This class implements FTP transfer.

Method Detail

init

public void init()
          throws ClientException
Description copied from class: FTPTransfer
Inits FTP transfer (SSL Factory ...)

Specified by:
init in interface TransferController
Overrides:
init in class FTPTransfer
Throws:
ClientException

begin

public void begin()
Start upload thread.

Specified by:
begin in interface TransferController
Specified by:
begin in class FTPTransfer

run

public void run()
Main loop

Specified by:
run in interface java.lang.Runnable

transfer

protected void transfer(java.io.File currentfile,
                        java.util.HashMap meta)
                 throws ClientException
Upload current file with optional additional parameters.

Parameters:
currentfile -
meta - additional parameters
Throws:
ClientException

cancel

public void cancel()
Cancel current upload by closing inputstream.

Specified by:
cancel in interface TransferController
Specified by:
cancel in class FTPTransfer

execute

public java.lang.Object execute()
                         throws ClientException
NOT IMPLEMENTED for FTP UPLOAD transfer. No need for synchroneous transfer.

Specified by:
execute in interface TransferController
Specified by:
execute in class FTPTransfer
Throws:
ClientException


Copyright © 1999-2007 JavaZOOM.