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>
  • Method Details

    • builder

      public static SessionConnection.Builder builder()
    • clear

      public void clear()
      Specified by:
      clear in interface JschSshClient.Connection<com.jcraft.jsch.Session>
    • create

      public com.jcraft.jsch.Session create() throws Exception
      Specified by:
      create in interface JschSshClient.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

      public LoginCredentials 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

      @Nullable public com.jcraft.jsch.Session getSession()
      Returns:
      the current session or null if not connected
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object