Package com.consol.citrus.ssh.client
Class SshClient
- java.lang.Object
-
- com.consol.citrus.endpoint.AbstractEndpoint
-
- com.consol.citrus.ssh.client.SshClient
-
- All Implemented Interfaces:
Named,Endpoint,com.consol.citrus.messaging.Consumer,com.consol.citrus.messaging.Producer,com.consol.citrus.messaging.ReplyConsumer,com.consol.citrus.messaging.SelectiveConsumer
public class SshClient extends AbstractEndpoint implements com.consol.citrus.messaging.Producer, com.consol.citrus.messaging.ReplyConsumer
Ssh client connects to ssh server and sends commands to that server.- Since:
- 1.4
- Author:
- Roland Huss, Christoph Deppisch
-
-
Constructor Summary
Constructors Modifier Constructor Description SshClient()Default constructor initializing endpoint configuration.protectedSshClient(SshEndpointConfiguration endpointConfiguration)Default constructor using endpoint configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.consol.citrus.messaging.SelectiveConsumercreateConsumer()com.consol.citrus.messaging.ProducercreateProducer()SshEndpointConfigurationgetEndpointConfiguration()com.jcraft.jsch.JSchgetJsch()Gets the JSch implementation.Messagereceive(TestContext context)Messagereceive(TestContext context, long timeout)Messagereceive(String selector, TestContext context)Messagereceive(String selector, TestContext context, long timeout)voidsend(Message message, TestContext context)Send a message as SSH request.voidsetCorrelationManager(CorrelationManager<Message> correlationManager)Sets the correlation manager.voidsetJsch(com.jcraft.jsch.JSch jsch)Sets the JSch implementation.-
Methods inherited from class com.consol.citrus.endpoint.AbstractEndpoint
getActor, getConsumerName, getName, getProducerName, setActor, setName
-
-
-
-
Constructor Detail
-
SshClient
public SshClient()
Default constructor initializing endpoint configuration.
-
SshClient
protected SshClient(SshEndpointConfiguration endpointConfiguration)
Default constructor using endpoint configuration.- Parameters:
endpointConfiguration-
-
-
Method Detail
-
getEndpointConfiguration
public SshEndpointConfiguration getEndpointConfiguration()
- Specified by:
getEndpointConfigurationin interfaceEndpoint- Overrides:
getEndpointConfigurationin classAbstractEndpoint
-
send
public void send(Message message, TestContext context)
Send a message as SSH request. The message format is created fromSshServer.- Specified by:
sendin interfacecom.consol.citrus.messaging.Producer- Parameters:
message- the message object to send.context-
-
receive
public Message receive(TestContext context)
- Specified by:
receivein interfacecom.consol.citrus.messaging.Consumer
-
receive
public Message receive(String selector, TestContext context)
- Specified by:
receivein interfacecom.consol.citrus.messaging.SelectiveConsumer
-
receive
public Message receive(TestContext context, long timeout)
- Specified by:
receivein interfacecom.consol.citrus.messaging.Consumer
-
receive
public Message receive(String selector, TestContext context, long timeout)
- Specified by:
receivein interfacecom.consol.citrus.messaging.SelectiveConsumer
-
createProducer
public com.consol.citrus.messaging.Producer createProducer()
- Specified by:
createProducerin interfaceEndpoint
-
createConsumer
public com.consol.citrus.messaging.SelectiveConsumer createConsumer()
- Specified by:
createConsumerin interfaceEndpoint
-
getJsch
public com.jcraft.jsch.JSch getJsch()
Gets the JSch implementation.- Returns:
-
setJsch
public void setJsch(com.jcraft.jsch.JSch jsch)
Sets the JSch implementation.- Parameters:
jsch-
-
setCorrelationManager
public void setCorrelationManager(CorrelationManager<Message> correlationManager)
Sets the correlation manager.- Parameters:
correlationManager-
-
-