Package org.jclouds.sshj
Class SshjSshClient
java.lang.Object
org.jclouds.sshj.SshjSshClient
- All Implemented Interfaces:
SshClient
This class needs refactoring. It is not thread safe.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.jclouds.ssh.SshClient
SshClient.Factory
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSshjSshClient
(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 SshjSshClient.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 SshjSshClient.Connection
<net.schmizz.sshj.connection.channel.direct.Session> boolean
protected SshjSshClient.Connection
<net.schmizz.sshj.connection.channel.direct.Session> void
void
toString()
-
Field Details
-
logger
-
-
Constructor Details
-
SshjSshClient
public SshjSshClient(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 SshjSshClient.Connection<net.schmizz.sshj.connection.channel.direct.Session> execConnection() -
exec
Description copied from interface:SshClient
Execute a process and block until it is complete -
noPTYConnection
protected SshjSshClient.Connection<net.schmizz.sshj.connection.channel.direct.Session> noPTYConnection() -
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
-
getHostAddress
- Specified by:
getHostAddress
in interfaceSshClient
-
getUsername
- Specified by:
getUsername
in interfaceSshClient
-