com.mindbright.ssh
Class SSHTunnel

java.lang.Object
  extended by com.mindbright.ssh.SSHTunnel
All Implemented Interfaces:
SSHChannelListener
Direct Known Subclasses:
SSHFtpTunnel

public class SSHTunnel
extends java.lang.Object
implements SSHChannelListener


Field Summary
protected  SSHChannelController controller
           
protected  java.net.Socket ioSocket
           
protected  java.lang.String remoteDesc
           
protected  SSHRxChannel rxChan
           
protected  SSHTxChannel txChan
           
protected  Queue txQueue
           
 
Constructor Summary
SSHTunnel(java.net.Socket ioSocket, int channelId, int remoteChannelId, SSHChannelController controller)
           
 
Method Summary
 void checkTermination()
           
 void close(SSHChannel chan)
           
 java.lang.String getDescription()
           
 java.lang.String getLocalHost()
           
 int getLocalPort()
           
 boolean isOpen()
           
 void openFailure()
           
 SSHPdu prepare(SSHPdu pdu)
           
 void receive(SSHPdu pdu)
           
 void receiveInputEOF()
           
 void receiveOutputClosed()
           
 void sendInputEOF()
           
 void sendOutputClosed()
           
 boolean setRemoteChannelId(int remoteChannelId)
           
 void setRemoteDesc(java.lang.String desc)
           
 void start()
           
 void terminateNow()
           
 void transmit(SSHPdu pdu)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller

protected SSHChannelController controller

ioSocket

protected java.net.Socket ioSocket

txChan

protected SSHTxChannel txChan

rxChan

protected SSHRxChannel rxChan

txQueue

protected Queue txQueue

remoteDesc

protected java.lang.String remoteDesc
Constructor Detail

SSHTunnel

public SSHTunnel(java.net.Socket ioSocket,
                 int channelId,
                 int remoteChannelId,
                 SSHChannelController controller)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getLocalPort

public int getLocalPort()

getLocalHost

public java.lang.String getLocalHost()

isOpen

public boolean isOpen()

setRemoteChannelId

public boolean setRemoteChannelId(int remoteChannelId)

start

public void start()

openFailure

public void openFailure()

prepare

public SSHPdu prepare(SSHPdu pdu)
               throws java.io.IOException
Specified by:
prepare in interface SSHChannelListener
Throws:
java.io.IOException

receive

public void receive(SSHPdu pdu)
Specified by:
receive in interface SSHChannelListener

transmit

public void transmit(SSHPdu pdu)
Specified by:
transmit in interface SSHChannelListener

close

public void close(SSHChannel chan)
Specified by:
close in interface SSHChannelListener

terminateNow

public void terminateNow()

checkTermination

public void checkTermination()

sendOutputClosed

public void sendOutputClosed()

sendInputEOF

public void sendInputEOF()

receiveOutputClosed

public void receiveOutputClosed()

receiveInputEOF

public void receiveInputEOF()

setRemoteDesc

public void setRemoteDesc(java.lang.String desc)

getDescription

public java.lang.String getDescription()