Package org.jclouds.ssh.jsch
Class SessionConnection
java.lang.Object
org.jclouds.ssh.jsch.SessionConnection
- All Implemented Interfaces:
JschSshClient.Connection<com.jcraft.jsch.Session>
public final class SessionConnection
extends Object
implements JschSshClient.Connection<com.jcraft.jsch.Session>
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
builder
-
clear
public void clear()- Specified by:
clear
in interfaceJschSshClient.Connection<com.jcraft.jsch.Session>
-
create
- Specified by:
create
in interfaceJschSshClient.Connection<com.jcraft.jsch.Session>
- Throws:
Exception
-
getHostAndPort
public com.google.common.net.HostAndPort getHostAndPort()- Returns:
- host and port, where port if not present defaults to
22
-
getLoginCredentials
- Returns:
- login used in this session
-
getProxy
public com.google.common.base.Optional<com.jcraft.jsch.Proxy> getProxy()- Returns:
- proxy used for this connection
-
getConnectTimeout
public int getConnectTimeout()- Returns:
- how long to wait for the initial connection to be made
-
getSessionTimeout
public int getSessionTimeout()- Returns:
- how long to keep the session open, or
0
for indefinitely
-
getSession
- Returns:
- the current session or
null
if not connected
-
equals
-
hashCode
public int hashCode() -
toString
-