public final class FtpFileSystem extends org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>
AbstractFileSystem for files residing on a FTP server| Modifier and Type | Method and Description |
|---|---|
void |
awaitCommandCompletion()
Awaits for the underlying
client to complete any pending commands. |
void |
changeToBaseDir()
Changes the
client's current working directory to the base path |
protected org.mule.extension.file.common.api.lock.PathLock |
createLock(Path path) |
void |
disconnect()
Severs the connection by invoking
FTPClient.logout() and FTPClient.disconnect() on the provided
client. |
org.apache.commons.net.ftp.FTPClient |
getClient() |
protected org.mule.extension.file.common.api.command.CopyCommand |
getCopyCommand() |
protected org.mule.extension.file.common.api.command.CreateDirectoryCommand |
getCreateDirectoryCommand() |
protected org.mule.extension.file.common.api.command.DeleteCommand |
getDeleteCommand() |
protected org.mule.extension.file.common.api.command.ListCommand |
getListCommand() |
protected org.mule.extension.file.common.api.command.MoveCommand |
getMoveCommand() |
protected org.mule.extension.file.common.api.command.ReadCommand |
getReadCommand() |
protected org.mule.extension.file.common.api.command.RenameCommand |
getRenameCommand() |
protected org.mule.extension.file.common.api.command.WriteCommand |
getWriteCommand() |
protected boolean |
isConnected() |
InputStream |
retrieveFileContent(org.mule.extension.file.common.api.FileAttributes filePayload)
Returns an InputStream which obtains the content for the file of the given
filePayload. |
void |
setPassiveMode(boolean passive)
|
void |
setResponseTimeout(Integer timeout,
TimeUnit timeUnit)
Sets the data timeout property on the underlying
client |
void |
setTransferMode(FtpTransferMode mode)
Sets the transfer mode on the
client |
org.mule.runtime.api.connection.ConnectionValidationResult |
validateConnection()
Validates the underlying connection to the remote server
|
public void disconnect()
FTPClient.logout() and FTPClient.disconnect() on the provided
client.
Notice that FTPClient.disconnect() will be invoked even if FTPClient.logout() fails. This method will never
throw exception. Any errors will be logged.
protected boolean isConnected()
public org.mule.runtime.api.connection.ConnectionValidationResult validateConnection()
ConnectionValidationResultpublic void setTransferMode(FtpTransferMode mode)
clientmode - a FtpTransferModepublic void setResponseTimeout(Integer timeout, TimeUnit timeUnit)
clienttimeout - a timeout scalartimeUnit - a TimeUnit which qualifies the timeoutpublic void setPassiveMode(boolean passive)
passive - whether to go passive mode or notpublic InputStream retrieveFileContent(org.mule.extension.file.common.api.FileAttributes filePayload)
filePayload.
The invoked MUST make sure that the returned stream is closed in order for the underlying connection to be closed.
filePayload - a FileAttributes referencing to a FTP fileInputStreampublic void awaitCommandCompletion()
protected org.mule.extension.file.common.api.lock.PathLock createLock(Path path)
createLock in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>public void changeToBaseDir()
client's current working directory to the base pathpublic org.apache.commons.net.ftp.FTPClient getClient()
protected org.mule.extension.file.common.api.command.ReadCommand getReadCommand()
getReadCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.ListCommand getListCommand()
getListCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.WriteCommand getWriteCommand()
getWriteCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.CopyCommand getCopyCommand()
getCopyCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.MoveCommand getMoveCommand()
getMoveCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.DeleteCommand getDeleteCommand()
getDeleteCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.RenameCommand getRenameCommand()
getRenameCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>protected org.mule.extension.file.common.api.command.CreateDirectoryCommand getCreateDirectoryCommand()
getCreateDirectoryCommand in class org.mule.extension.file.common.api.AbstractFileSystem<FtpFileAttributes>Copyright © 2018 MuleSoft, Inc.. All rights reserved.