|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.net.SocketClient
org.apache.commons.net.ftp.FTP
org.apache.commons.net.ftp.FTPClient
org.ow2.petals.bc.ftp.connection.WrappedFTPClient
public class WrappedFTPClient
This class handle a connection to the FTP server with the specified configuration parameter
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.net.ftp.FTPClient |
|---|
ACTIVE_LOCAL_DATA_CONNECTION_MODE, ACTIVE_REMOTE_DATA_CONNECTION_MODE, PASSIVE_LOCAL_DATA_CONNECTION_MODE, PASSIVE_REMOTE_DATA_CONNECTION_MODE |
| Fields inherited from class org.apache.commons.net.ftp.FTP |
|---|
_commandSupport_, _controlEncoding, _controlInput_, _controlOutput_, _newReplyString, _replyCode, _replyLines, _replyString, ASCII_FILE_TYPE, BINARY_FILE_TYPE, BLOCK_TRANSFER_MODE, CARRIAGE_CONTROL_TEXT_FORMAT, COMPRESSED_TRANSFER_MODE, DEFAULT_CONTROL_ENCODING, DEFAULT_DATA_PORT, DEFAULT_PORT, EBCDIC_FILE_TYPE, FILE_STRUCTURE, LOCAL_FILE_TYPE, NON_PRINT_TEXT_FORMAT, PAGE_STRUCTURE, RECORD_STRUCTURE, STREAM_TRANSFER_MODE, strictMultilineParsing, TELNET_TEXT_FORMAT |
| Fields inherited from class org.apache.commons.net.SocketClient |
|---|
_defaultPort_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL |
| Constructor Summary | |
|---|---|
WrappedFTPClient(FTPConnectionInfo connectionInfo,
java.util.logging.Logger logger)
|
|
| Method Summary | |
|---|---|
void |
configureConnection()
This method sets : the working directory the data connection mode (Active or Passive) the type of transfer (ASCII or Binary) |
void |
connectAndLog()
Connect and log the FTP client with the current configuration |
void |
del(java.lang.String remoteFile)
Deleted the specified remote file. |
org.w3c.dom.Document |
get(java.lang.String filePattern)
Get a file content from a FTP server. |
FTPConnectionInfo |
getConnectionInfo()
|
javax.activation.DataHandler |
getFileAsAttachment(java.lang.String filePatternWildCard)
Get a file content from a FTP server. |
java.util.List<java.lang.String> |
listFolderContent()
List files from FTP server |
void |
mDel(java.util.List<java.lang.String> remoteFiles)
|
java.util.Map<java.lang.String,javax.activation.DataHandler> |
mGet(java.util.List<java.lang.String> filePatternWildCardList)
This method will only get files, it does not include subpath |
void |
mPut(java.util.Map<java.lang.String,javax.activation.DataHandler> attachments)
Put files on the FTP server. |
void |
putString(java.lang.String fileName,
java.lang.String content)
Put the file on the FTP server. |
| Methods inherited from class org.apache.commons.net.ftp.FTPClient |
|---|
_connectAction_, _openDataConnection_, abort, allocate, allocate, appendFile, appendFileStream, changeToParentDirectory, changeWorkingDirectory, completePendingCommand, configure, deleteFile, disconnect, enterLocalActiveMode, enterLocalPassiveMode, enterRemoteActiveMode, enterRemotePassiveMode, getBufferSize, getDataConnectionMode, getListArguments, getListHiddenFiles, getModificationTime, getPassiveHost, getPassivePort, getRestartOffset, getStatus, getStatus, getSystemName, initiateListParsing, initiateListParsing, initiateListParsing, isRemoteVerificationEnabled, listFiles, listFiles, listHelp, listHelp, listNames, listNames, login, login, logout, makeDirectory, printWorkingDirectory, remoteAppend, remoteRetrieve, remoteStore, remoteStoreUnique, remoteStoreUnique, removeDirectory, rename, retrieveFile, retrieveFileStream, sendNoOp, sendSiteCommand, setBufferSize, setDataTimeout, setFileStructure, setFileTransferMode, setFileType, setFileType, setListHiddenFiles, setParserFactory, setRemoteVerificationEnabled, setRestartOffset, storeFile, storeFileStream, storeUniqueFile, storeUniqueFile, storeUniqueFileStream, storeUniqueFileStream, structureMount |
| Methods inherited from class org.apache.commons.net.ftp.FTP |
|---|
abor, acct, addProtocolCommandListener, allo, allo, appe, cdup, cwd, dele, getControlEncoding, getReply, getReplyCode, getReplyString, getReplyStrings, help, help, isStrictMultilineParsing, list, list, mdtm, mkd, mode, nlst, nlst, noop, pass, pasv, port, pwd, quit, rein, removeProtocolCommandListener, rest, retr, rmd, rnfr, rnto, sendCommand, sendCommand, sendCommand, sendCommand, setControlEncoding, setStrictMultilineParsing, site, smnt, stat, stat, stor, stou, stou, stru, syst, type, type, user |
| Methods inherited from class org.apache.commons.net.SocketClient |
|---|
connect, connect, connect, connect, connect, connect, getConnectTimeout, getDefaultPort, getDefaultTimeout, getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort, getSoLinger, getSoTimeout, getTcpNoDelay, isConnected, setConnectTimeout, setDefaultPort, setDefaultTimeout, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrappedFTPClient(FTPConnectionInfo connectionInfo,
java.util.logging.Logger logger)
| Method Detail |
|---|
public void configureConnection()
throws java.io.IOException
java.io.IOException
public void del(java.lang.String remoteFile)
throws java.io.IOException
remoteFile - Remote file to delete
java.io.IOException
java.lang.InterruptedException
public org.w3c.dom.Document get(java.lang.String filePattern)
throws java.io.IOException
server - the serverport - the portlogin - the loginpassword - the passwordfilePattern - the remote file
java.lang.InterruptedException
org.xml.sax.SAXException
FTPBCException - impossible to get: The file does not exist
java.io.IOExceptionpublic FTPConnectionInfo getConnectionInfo()
public javax.activation.DataHandler getFileAsAttachment(java.lang.String filePatternWildCard)
throws java.io.IOException
server - the serverport - the portlogin - the loginpassword - the passwordfilePatternWildCard - the remote file
java.lang.InterruptedException
FTPBCException - impossible to get: The file does not exist
java.io.IOException
public void connectAndLog()
throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.String> listFolderContent()
throws java.io.IOException
java.io.IOException
java.lang.InterruptedException
public void mDel(java.util.List<java.lang.String> remoteFiles)
throws java.io.IOException
java.io.IOException
public java.util.Map<java.lang.String,javax.activation.DataHandler> mGet(java.util.List<java.lang.String> filePatternWildCardList)
throws java.io.IOException
filePatternWildCardList -
java.io.IOException
java.lang.InterruptedException
public void mPut(java.util.Map<java.lang.String,javax.activation.DataHandler> attachments)
throws java.io.IOException
attachments -
java.io.IOException
java.lang.InterruptedException
public void putString(java.lang.String fileName,
java.lang.String content)
throws java.io.IOException
fileName - content -
java.io.IOException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||