com.jcraft.jsch.JSch Class Reference

This class serves as a central configuration point, and as a factory for Session objects configured with these settings. More...

Collaboration diagram for com.jcraft.jsch.JSch:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 JSch ()
 Creates a new JSch object.
Session getSession (String username, String host) throws JSchException
 Creates a new Session on port 22.
Session getSession (String username, String host, int port) throws JSchException
 Creates a new Session.
void setHostKeyRepository (HostKeyRepository hkrepo)
 Sets the Host key repository.

Protected Member Functions

void addSession (Session session)
 Adds a session to our session pool.
boolean removeSession (Session session)
 Removes a session from our session pool.

Package Attributes

java.util.Vector identities = new java.util.Vector()

Static Package Attributes

static java.util.Hashtable config = new java.util.Hashtable()
static Logger logger = DEVNULL

Private Attributes

HostKeyRepository known_hosts = null

Static Private Attributes

static final Logger DEVNULL
 A no-op Logger implementation.

Detailed Description

This class serves as a central configuration point, and as a factory for Session objects configured with these settings.

Definition at line 49 of file JSch.java.


Constructor & Destructor Documentation

com.jcraft.jsch.JSch.JSch (  ) 

Creates a new JSch object.

Definition at line 149 of file JSch.java.

References com.jcraft.jsch.JSch.config.


Member Function Documentation

void com.jcraft.jsch.JSch.addSession ( Session  session  )  [protected]

Adds a session to our session pool.

This is invoked by the sessions on Session#connect, and should supposedly have package-access.

Definition at line 201 of file JSch.java.

Referenced by com.jcraft.jsch.Session.connect().

Session com.jcraft.jsch.JSch.getSession ( String  username,
String  host,
int  port 
) throws JSchException

Creates a new Session.

Parameters:
username the remote user name to use.
host the host to connect to.
port the port number used for the TCP connection.
Returns:
The new session object. It is not yet connected.

Definition at line 180 of file JSch.java.

Session com.jcraft.jsch.JSch.getSession ( String  username,
String  host 
) throws JSchException

Creates a new Session on port 22.

Parameters:
username the remote user name to use.
host the host to connect to.
Returns:
The new session object. It is not yet connected.

Definition at line 171 of file JSch.java.

References com.jcraft.jsch.JSch.getSession().

Referenced by edu.rice.cs.hpc.remote.tunnel.SSHManager.connect(), edu.rice.cs.hpc.remote.tunnel.LocalTunneling.connect(), com.jcraft.jsch.JSch.getSession(), and edu.rice.cs.hpc.remote.tunnel.PortForwarding.main().

boolean com.jcraft.jsch.JSch.removeSession ( Session  session  )  [protected]

Removes a session from our session pool.

This is invoked by the sessions on Session#disconnect, and should supposedly have package-access.

Definition at line 213 of file JSch.java.

void com.jcraft.jsch.JSch.setHostKeyRepository ( HostKeyRepository  hkrepo  ) 

Sets the Host key repository.

This will be used by sessions Session.connect connected} in the future to validate the host keys offered by the remote hosts.

Definition at line 224 of file JSch.java.

References com.jcraft.jsch.JSch.known_hosts.


Member Data Documentation

java.util.Hashtable com.jcraft.jsch.JSch.config = new java.util.Hashtable() [static, package]

Definition at line 50 of file JSch.java.

Referenced by com.jcraft.jsch.JSch.JSch().

final Logger com.jcraft.jsch.JSch.DEVNULL [static, private]
Initial value:
new Logger(){
      public boolean isEnabled(int level){return false;}
      public void log(int level, String message){}
    }

A no-op Logger implementation.

Definition at line 140 of file JSch.java.

java.util.Vector com.jcraft.jsch.JSch.identities = new java.util.Vector() [package]

Definition at line 134 of file JSch.java.

Referenced by com.jcraft.jsch.ChannelAgentForwarding.write().

Definition at line 135 of file JSch.java.

Referenced by com.jcraft.jsch.JSch.setHostKeyRepository().

Logger com.jcraft.jsch.JSch.logger = DEVNULL [static, package]

Definition at line 144 of file JSch.java.


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1