org.jclouds.sshj
Class SSHClientConnection

java.lang.Object
  extended by org.jclouds.sshj.SSHClientConnection
All Implemented Interfaces:
SshjSshClient.Connection<net.schmizz.sshj.SSHClient>

public class SSHClientConnection
extends Object
implements SshjSshClient.Connection<net.schmizz.sshj.SSHClient>


Nested Class Summary
static class SSHClientConnection.Builder
           
 
Field Summary
protected  org.jclouds.logging.Logger logger
           
 
Method Summary
static SSHClientConnection.Builder builder()
           
 void clear()
           
 net.schmizz.sshj.SSHClient create()
           
 boolean equals(Object o)
           
 com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> getAgentConnector()
           
 int getConnectTimeout()
           
 com.google.common.net.HostAndPort getHostAndPort()
           
 org.jclouds.domain.LoginCredentials getLoginCredentials()
           
 int getSessionTimeout()
           
 net.schmizz.sshj.SSHClient getSSHClient()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.ssh")
protected org.jclouds.logging.Logger logger
Method Detail

builder

public static SSHClientConnection.Builder builder()

clear

public void clear()
Specified by:
clear in interface SshjSshClient.Connection<net.schmizz.sshj.SSHClient>

create

public net.schmizz.sshj.SSHClient create()
                                  throws Exception
Specified by:
create in interface SshjSshClient.Connection<net.schmizz.sshj.SSHClient>
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 ssh

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 ssh open, or 0 for indefinitely

getAgentConnector

public com.google.common.base.Optional<com.jcraft.jsch.agentproxy.Connector> getAgentConnector()
Returns:
Ssh agent connector

getSSHClient

public net.schmizz.sshj.SSHClient getSSHClient()
Returns:
the current ssh 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-2014 The Apache Software Foundation. All Rights Reserved.