public class SftpClient extends FtpClient
| Modifier | Constructor and Description |
|---|---|
|
SftpClient()
Default constructor initializing endpoint configuration.
|
protected |
SftpClient(SftpEndpointConfiguration endpointConfiguration)
Default constructor using endpoint configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
connectAndLogin()
Opens a new connection and performs login with user name and password if set.
|
protected FtpMessage |
createDir(CommandType ftpCommand)
Execute mkDir command and create new directory.
|
protected FtpMessage |
deleteFile(DeleteCommand delete,
TestContext context)
Performs delete file operation.
|
void |
destroy() |
protected FtpMessage |
executeCommand(CommandType ftpCommand,
TestContext context) |
SftpEndpointConfiguration |
getEndpointConfiguration() |
protected String |
getPrivateKeyPath() |
com.jcraft.jsch.JSch |
getSsh()
Gets the ssh.
|
protected boolean |
isDirectory(String remoteFilePath)
Check file path type directory or file.
|
protected FtpMessage |
listFiles(ListCommand list,
TestContext context)
Perform list files operation and provide file information as response.
|
protected FtpMessage |
retrieveFile(GetCommand command,
TestContext context)
Performs retrieve file operation.
|
void |
setSsh(com.jcraft.jsch.JSch ssh)
Sets the ssh.
|
protected FtpMessage |
storeFile(PutCommand command,
TestContext context)
Performs store file operation.
|
addFileNameToTargetPath, createConsumer, createProducer, getFtpClient, getLocalFileInputStream, receive, receive, receive, receive, send, setCorrelationManager, setFtpClientgetActor, getConsumerName, getName, getProducerName, setActor, setBeanName, setNamepublic SftpClient()
protected SftpClient(SftpEndpointConfiguration endpointConfiguration)
endpointConfiguration - public SftpEndpointConfiguration getEndpointConfiguration()
getEndpointConfiguration in interface EndpointgetEndpointConfiguration in class FtpClientprotected FtpMessage executeCommand(CommandType ftpCommand, TestContext context)
executeCommand in class FtpClientprotected FtpMessage createDir(CommandType ftpCommand)
ftpCommand - protected FtpMessage listFiles(ListCommand list, TestContext context)
FtpClientprotected FtpMessage deleteFile(DeleteCommand delete, TestContext context)
FtpClientdeleteFile in class FtpClientprotected boolean isDirectory(String remoteFilePath)
FtpClientisDirectory in class FtpClientprotected FtpMessage storeFile(PutCommand command, TestContext context)
FtpClientprotected FtpMessage retrieveFile(GetCommand command, TestContext context)
FtpClientretrieveFile in class FtpClientprotected void connectAndLogin()
FtpClientconnectAndLogin in class FtpClientprotected String getPrivateKeyPath() throws IOException
IOExceptionpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class FtpClientpublic void destroy()
throws Exception
public com.jcraft.jsch.JSch getSsh()
public void setSsh(com.jcraft.jsch.JSch ssh)
ssh - Copyright © 2008–2018 ConSol Software GmbH. All rights reserved.