public class SftpFileSystem extends FtpFileSystem
FtpFileSystem for files residing on a SFTP server| Modifier and Type | Field and Description |
|---|---|
protected SftpClient |
client |
protected org.mule.extension.file.common.api.command.CopyCommand |
copyCommand |
protected org.mule.extension.file.common.api.command.CreateDirectoryCommand |
createDirectoryCommand |
protected org.mule.extension.file.common.api.command.DeleteCommand |
deleteCommand |
protected org.mule.extension.file.common.api.command.ListCommand |
listCommand |
protected org.mule.extension.file.common.api.command.MoveCommand |
moveCommand |
protected org.mule.extension.file.common.api.command.ReadCommand |
readCommand |
protected org.mule.extension.file.common.api.command.RenameCommand |
renameCommand |
protected org.mule.extension.file.common.api.command.WriteCommand |
writeCommand |
| Constructor and Description |
|---|
SftpFileSystem(SftpClient client,
String basePath,
MuleContext muleContext)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeToBaseDir() |
protected org.mule.extension.file.common.api.lock.PathLock |
createLock(Path path,
Object... params) |
void |
disconnect()
Severs the underlying connection to the remote server
|
Class<? extends org.mule.extension.file.common.api.FileAttributes> |
getAttributesType() |
org.mule.extension.file.common.api.command.CopyCommand |
getCopyCommand() |
org.mule.extension.file.common.api.command.CreateDirectoryCommand |
getCreateDirectoryCommand() |
org.mule.extension.file.common.api.command.DeleteCommand |
getDeleteCommand() |
org.mule.extension.file.common.api.command.ListCommand |
getListCommand() |
org.mule.extension.file.common.api.command.MoveCommand |
getMoveCommand() |
org.mule.extension.file.common.api.command.ReadCommand |
getReadCommand() |
org.mule.extension.file.common.api.command.RenameCommand |
getRenameCommand() |
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. |
validateConnectionprotected final SftpClient client
protected final org.mule.extension.file.common.api.command.CopyCommand copyCommand
protected final org.mule.extension.file.common.api.command.CreateDirectoryCommand createDirectoryCommand
protected final org.mule.extension.file.common.api.command.DeleteCommand deleteCommand
protected final org.mule.extension.file.common.api.command.ListCommand listCommand
protected final org.mule.extension.file.common.api.command.MoveCommand moveCommand
protected final org.mule.extension.file.common.api.command.ReadCommand readCommand
protected final org.mule.extension.file.common.api.command.RenameCommand renameCommand
protected final org.mule.extension.file.common.api.command.WriteCommand writeCommand
public SftpFileSystem(SftpClient client, String basePath, MuleContext muleContext)
client - a ready to use FTPClientpublic void disconnect()
disconnect in class FtpFileSystempublic void changeToBaseDir()
public 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.
retrieveFileContent in class FtpFileSystemfilePayload - a FileAttributes referencing to a FTP fileInputStreamprotected boolean isConnected()
isConnected in class FtpFileSystemprotected org.mule.extension.file.common.api.lock.PathLock createLock(Path path, Object... params)
createLock in class org.mule.extension.file.common.api.AbstractFileSystemURLPathLock based on the client's connection informationpublic org.mule.extension.file.common.api.command.CopyCommand getCopyCommand()
getCopyCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.CreateDirectoryCommand getCreateDirectoryCommand()
getCreateDirectoryCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.DeleteCommand getDeleteCommand()
getDeleteCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.ListCommand getListCommand()
getListCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.MoveCommand getMoveCommand()
getMoveCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.ReadCommand getReadCommand()
getReadCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.RenameCommand getRenameCommand()
getRenameCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic org.mule.extension.file.common.api.command.WriteCommand getWriteCommand()
getWriteCommand in class org.mule.extension.file.common.api.AbstractFileSystempublic Class<? extends org.mule.extension.file.common.api.FileAttributes> getAttributesType()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.