com.sshtools.j2ssh.agent
Class SshAgentForwardingListener

java.lang.Object
  extended by com.sshtools.j2ssh.agent.SshAgentForwardingListener

public class SshAgentForwardingListener
extends java.lang.Object

Version:
$Revision: 1.1 $
Author:
$author$

Field Summary
private static java.util.HashMap agents
           
(package private)  ConnectionProtocol connection
           
(package private)  java.lang.String location
           
private static org.apache.commons.logging.Log log
           
(package private)  int port
           
(package private)  java.util.Vector references
           
(package private)  java.net.ServerSocket server
           
(package private)  java.lang.String sessionId
           
(package private)  StartStopState state
           
(package private)  java.lang.Thread thread
           
 
Constructor Summary
SshAgentForwardingListener(java.lang.String sessionId, ConnectionProtocol connection)
           
 
Method Summary
 void addReference(java.lang.Object obj)
           
 java.lang.String getConfiguration()
           
static SshAgentForwardingListener getInstance(java.lang.String sessionId, ConnectionProtocol connection)
           
 int getPort()
           
 void removeReference(java.lang.Object obj)
           
private  int selectPort()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

agents

private static java.util.HashMap agents

server

java.net.ServerSocket server

port

int port

location

java.lang.String location

state

StartStopState state

thread

java.lang.Thread thread

connection

ConnectionProtocol connection

references

java.util.Vector references

sessionId

java.lang.String sessionId
Constructor Detail

SshAgentForwardingListener

SshAgentForwardingListener(java.lang.String sessionId,
                           ConnectionProtocol connection)
Method Detail

getConfiguration

public java.lang.String getConfiguration()
Returns:

addReference

public void addReference(java.lang.Object obj)
Parameters:
obj -

removeReference

public void removeReference(java.lang.Object obj)
Parameters:
obj -

start

public void start()
           throws java.io.IOException
Throws:
java.io.IOException

getPort

public int getPort()
Returns:

stop

public void stop()

selectPort

private int selectPort()

getInstance

public static SshAgentForwardingListener getInstance(java.lang.String sessionId,
                                                     ConnectionProtocol connection)
                                              throws AgentNotAvailableException
Parameters:
sessionId -
connection -
Returns:
Throws:
AgentNotAvailableException