Package org.jclouds.ssh.jsch
Class JschSshClient
java.lang.Object
org.jclouds.ssh.jsch.JschSshClient
- All Implemented Interfaces:
SshClient
This class needs refactoring. It is not thread safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
Nested classes/interfaces inherited from interface org.jclouds.ssh.SshClient
SshClient.Factory
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJschSshClient
(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoffLimitedRetryHandler, com.google.common.net.HostAndPort socket, LoginCredentials loginCredentials, int timeout, com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> agentConnector) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T,
C extends JschSshClient.Connection<T>>
Tacquire
(C connection) void
connect()
void
Execute a process and block until it is completeexecChannel
(String command) Execute a process and allow the user to interact with it.protected JschSshClient.ConnectionWithStreams
<com.jcraft.jsch.ChannelExec> execConnection
(String command) boolean
void
void
toString()
-
Field Details
-
logger
-
-
Constructor Details
-
JschSshClient
public JschSshClient(ProxyConfig proxyConfig, BackoffLimitedRetryHandler backoffLimitedRetryHandler, com.google.common.net.HostAndPort socket, LoginCredentials loginCredentials, int timeout, com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> agentConnector)
-
-
Method Details
-
put
-
acquire
-
connect
public void connect() -
get
-
put
-
toString
-
disconnect
@PreDestroy public void disconnect()- Specified by:
disconnect
in interfaceSshClient
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in interfaceSshClient
-
execConnection
protected JschSshClient.ConnectionWithStreams<com.jcraft.jsch.ChannelExec> execConnection(String command) -
exec
Description copied from interface:SshClient
Execute a process and block until it is complete -
getHostAddress
- Specified by:
getHostAddress
in interfaceSshClient
-
getUsername
- Specified by:
getUsername
in interfaceSshClient
-
execChannel
Description copied from interface:SshClient
Execute a process and allow the user to interact with it.- Specified by:
execChannel
in interfaceSshClient
- Parameters:
command
- command line to invoke- Returns:
- reference to the running process
-