org.jclouds.ssh.jsch
Class SessionConnection

java.lang.Object
  extended by org.jclouds.ssh.jsch.SessionConnection
All Implemented Interfaces:
JschSshClient.Connection<com.jcraft.jsch.Session>

public class SessionConnection
extends Object
implements JschSshClient.Connection<com.jcraft.jsch.Session>


Nested Class Summary
static class SessionConnection.Builder
           
 
Method Summary
static SessionConnection.Builder builder()
           
 void clear()
           
 com.jcraft.jsch.Session create()
           
 boolean equals(Object o)
           
 int getConnectTimeout()
           
 com.google.common.net.HostAndPort getHostAndPort()
           
 org.jclouds.domain.LoginCredentials getLoginCredentials()
           
 com.jcraft.jsch.Session getSession()
           
 int getSessionTimeout()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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 org.jclouds.domain.LoginCredentials getLoginCredentials()
Returns:
login used in this session

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

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


Copyright © 2009-2012 jclouds. All Rights Reserved.