public class

SshClient

extends Object
java.lang.Object
   ↳ org.mule.modules.ssh.multiplexer.SshClient

Class Overview

This class represents a client connected to a remote host. It basically holds a Session. per each command

Summary

Fields
private Connection connection
private SshConnectionDetails details
private static final Logger logger
private InputStream receiver
private BlockingQueue<String> receiverBuffer
private int receiverBufferSize
private SshThread responseConsumerThread
private SshThread responseProducerThread
private OutputStream sender
private Session session
Public Constructors
SshClient(SshConnectionDetails details)
Public Methods
void callback(String payload)
void connect()
void disconnect()
Disconnects the connection and the session if either of them are active
InputStream getReceiver()
BlockingQueue<String> getReceiverBuffer()
int getReceiverBufferSize()
OutputStream getSender()
Session getSession()
boolean isConnected()
indicates if the connection is active
void send(String command)
Sends the message over the connections.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private Connection connection

private SshConnectionDetails details

private static final Logger logger

private InputStream receiver

private BlockingQueue<String> receiverBuffer

private int receiverBufferSize

private SshThread responseConsumerThread

private SshThread responseProducerThread

private OutputStream sender

private Session session

Public Constructors

public SshClient (SshConnectionDetails details)

Parameters
details

Public Methods

public void callback (String payload)

Parameters
payload

public void connect ()

Throws
IOException

public void disconnect ()

Disconnects the connection and the session if either of them are active

public InputStream getReceiver ()

public BlockingQueue<String> getReceiverBuffer ()

public int getReceiverBufferSize ()

public OutputStream getSender ()

public Session getSession ()

public boolean isConnected ()

indicates if the connection is active

Returns
  • true if the channel is active

public void send (String command)

Sends the message over the connections. If the connection is yet not initialized, it is started then.

Parameters
command - the command to execute