|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.component.file.remote.SftpOperations
public class SftpOperations
SFTP remote file operations
Constructor Summary | |
---|---|
SftpOperations()
|
Method Summary | |
---|---|
boolean |
buildDirectory(String directory,
boolean absolute)
|
void |
changeCurrentDirectory(String path)
|
void |
changeToParentDirectory()
|
boolean |
connect(RemoteFileConfiguration configuration)
Connects to the remote server |
protected com.jcraft.jsch.Session |
createSession(RemoteFileConfiguration configuration)
|
boolean |
deleteFile(String name)
|
void |
disconnect()
Disconnects from the remote server |
boolean |
existsFile(String name)
|
String |
getCurrentDirectory()
|
boolean |
isConnected()
Returns whether we are connected to the remote server or not |
List<com.jcraft.jsch.ChannelSftp.LsEntry> |
listFiles()
|
List<com.jcraft.jsch.ChannelSftp.LsEntry> |
listFiles(String path)
|
boolean |
renameFile(String from,
String to)
|
boolean |
retrieveFile(String name,
Exchange exchange)
|
boolean |
sendNoop()
Sends a noop command to the remote server |
boolean |
sendSiteCommand(String command)
Sends a site command to the remote server |
void |
setEndpoint(GenericFileEndpoint endpoint)
|
boolean |
storeFile(String name,
Exchange exchange)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SftpOperations()
Method Detail |
---|
public void setEndpoint(GenericFileEndpoint endpoint)
setEndpoint
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
public boolean connect(RemoteFileConfiguration configuration) throws GenericFileOperationFailedException
RemoteFileOperations
connect
in interface RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
configuration
- configuration
GenericFileOperationFailedException
- can be thrownprotected com.jcraft.jsch.Session createSession(RemoteFileConfiguration configuration) throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchException
public boolean isConnected() throws GenericFileOperationFailedException
RemoteFileOperations
isConnected
in interface RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
- can be thrownpublic void disconnect() throws GenericFileOperationFailedException
RemoteFileOperations
disconnect
in interface RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
- can be thrownpublic boolean deleteFile(String name) throws GenericFileOperationFailedException
deleteFile
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public boolean renameFile(String from, String to) throws GenericFileOperationFailedException
renameFile
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public boolean buildDirectory(String directory, boolean absolute) throws GenericFileOperationFailedException
buildDirectory
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public String getCurrentDirectory() throws GenericFileOperationFailedException
getCurrentDirectory
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public void changeCurrentDirectory(String path) throws GenericFileOperationFailedException
changeCurrentDirectory
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public void changeToParentDirectory() throws GenericFileOperationFailedException
changeToParentDirectory
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public List<com.jcraft.jsch.ChannelSftp.LsEntry> listFiles() throws GenericFileOperationFailedException
listFiles
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public List<com.jcraft.jsch.ChannelSftp.LsEntry> listFiles(String path) throws GenericFileOperationFailedException
listFiles
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public boolean retrieveFile(String name, Exchange exchange) throws GenericFileOperationFailedException
retrieveFile
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public boolean storeFile(String name, Exchange exchange) throws GenericFileOperationFailedException
storeFile
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public boolean existsFile(String name) throws GenericFileOperationFailedException
existsFile
in interface GenericFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
public boolean sendNoop() throws GenericFileOperationFailedException
RemoteFileOperations
sendNoop
in interface RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
GenericFileOperationFailedException
- can be thrownpublic boolean sendSiteCommand(String command) throws GenericFileOperationFailedException
RemoteFileOperations
sendSiteCommand
in interface RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry>
command
- the command
GenericFileOperationFailedException
- can be thrown
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |