Package com.consol.citrus.ftp.client
Class ScpClient
- java.lang.Object
-
- com.consol.citrus.endpoint.AbstractEndpoint
-
- com.consol.citrus.ftp.client.FtpClient
-
- com.consol.citrus.ftp.client.SftpClient
-
- com.consol.citrus.ftp.client.ScpClient
-
- All Implemented Interfaces:
com.consol.citrus.common.InitializingPhase,com.consol.citrus.common.Named,com.consol.citrus.common.ShutdownPhase,com.consol.citrus.endpoint.Endpoint,com.consol.citrus.messaging.Consumer,com.consol.citrus.messaging.Producer,com.consol.citrus.messaging.ReplyConsumer,com.consol.citrus.messaging.SelectiveConsumer
public class ScpClient extends SftpClient
- Since:
- 2.7.6
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Modifier Constructor Description ScpClient()Default constructor initializing endpoint configuration.protectedScpClient(ScpEndpointConfiguration endpointConfiguration)Default constructor using endpoint configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconnectAndLogin()Opens a new connection and performs login with user name and password if set.protected FtpMessagecreateDir(CommandType ftpCommand)Execute mkDir command and create new directory.protected FtpMessagedeleteFile(DeleteCommand delete, com.consol.citrus.context.TestContext context)Performs delete file operation.voiddestroy()ScpEndpointConfigurationgetEndpointConfiguration()voidinitialize()protected FtpMessagelistFiles(ListCommand list, com.consol.citrus.context.TestContext context)Perform list files operation and provide file information as response.protected FtpMessageretrieveFile(GetCommand command, com.consol.citrus.context.TestContext context)Performs retrieve file operation.protected FtpMessagestoreFile(PutCommand command, com.consol.citrus.context.TestContext context)Performs store file operation.-
Methods inherited from class com.consol.citrus.ftp.client.SftpClient
executeCommand, getPrivateKeyPath, getSsh, isDirectory, setSsh
-
Methods inherited from class com.consol.citrus.ftp.client.FtpClient
addFileNameToTargetPath, createConsumer, createProducer, getFtpClient, getLocalFileInputStream, receive, receive, receive, receive, send, setCorrelationManager, setFtpClient
-
Methods inherited from class com.consol.citrus.endpoint.AbstractEndpoint
getActor, getConsumerName, getName, getProducerName, setActor, setName
-
-
-
-
Constructor Detail
-
ScpClient
public ScpClient()
Default constructor initializing endpoint configuration.
-
ScpClient
protected ScpClient(ScpEndpointConfiguration endpointConfiguration)
Default constructor using endpoint configuration.- Parameters:
endpointConfiguration-
-
-
Method Detail
-
getEndpointConfiguration
public ScpEndpointConfiguration getEndpointConfiguration()
- Specified by:
getEndpointConfigurationin interfacecom.consol.citrus.endpoint.Endpoint- Overrides:
getEndpointConfigurationin classSftpClient
-
createDir
protected FtpMessage createDir(CommandType ftpCommand)
Description copied from class:SftpClientExecute mkDir command and create new directory.- Overrides:
createDirin classSftpClient- Returns:
-
listFiles
protected FtpMessage listFiles(ListCommand list, com.consol.citrus.context.TestContext context)
Description copied from class:FtpClientPerform list files operation and provide file information as response.- Overrides:
listFilesin classSftpClient- Returns:
-
deleteFile
protected FtpMessage deleteFile(DeleteCommand delete, com.consol.citrus.context.TestContext context)
Description copied from class:FtpClientPerforms delete file operation.- Overrides:
deleteFilein classSftpClient
-
storeFile
protected FtpMessage storeFile(PutCommand command, com.consol.citrus.context.TestContext context)
Description copied from class:FtpClientPerforms store file operation.- Overrides:
storeFilein classSftpClient
-
retrieveFile
protected FtpMessage retrieveFile(GetCommand command, com.consol.citrus.context.TestContext context)
Description copied from class:FtpClientPerforms retrieve file operation.- Overrides:
retrieveFilein classSftpClient
-
connectAndLogin
protected void connectAndLogin()
Description copied from class:FtpClientOpens a new connection and performs login with user name and password if set.- Overrides:
connectAndLoginin classSftpClient
-
initialize
public void initialize()
- Specified by:
initializein interfacecom.consol.citrus.common.InitializingPhase- Overrides:
initializein classSftpClient
-
destroy
public void destroy()
- Specified by:
destroyin interfacecom.consol.citrus.common.ShutdownPhase- Overrides:
destroyin classSftpClient
-
-