com.mindbright.ssh2
Class SSH2FTPProxyFilter

java.lang.Object
  extended bycom.mindbright.ssh2.SSH2FTPProxyFilter
All Implemented Interfaces:
SSH2StreamFilter, SSH2StreamFilterFactory

public class SSH2FTPProxyFilter
extends java.lang.Object
implements SSH2StreamFilter, SSH2StreamFilterFactory

Implements support for FTP over SSH. This implemntation sits on the client side of the FTP command stream and opens new port forwards as needed for the various data transfers. No server-side proxy is needed.


Field Summary
protected  SSH2StreamChannel channel
           
protected  SSH2Connection connection
           
protected  com.mindbright.ssh2.SSH2FTPProxyFilter.FTPInput ftpIn
           
protected  com.mindbright.ssh2.SSH2FTPProxyFilter.FTPOutput ftpOut
           
protected  boolean waitingPASVResponse
           
 
Constructor Summary
  SSH2FTPProxyFilter(java.net.InetAddress localHost, java.net.InetAddress serverLocalAddr)
          Factory instance constructor
protected SSH2FTPProxyFilter(SSH2Connection connection, SSH2StreamChannel channel, SSH2FTPProxyFilter factory)
           
  SSH2FTPProxyFilter(java.lang.String localHost, java.lang.String serverLocalAddr)
          Factory instance constructor
 
Method Summary
 SSH2StreamFilter createFilter(SSH2Connection connection, SSH2StreamChannel channel)
          Instance constructor
 java.io.InputStream getInputFilter(java.io.InputStream toBeFiltered)
          Get the filter for the input stream.
 java.io.OutputStream getOutputFilter(java.io.OutputStream toBeFiltered)
          Get the filter for the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected SSH2Connection connection

channel

protected SSH2StreamChannel channel

ftpIn

protected com.mindbright.ssh2.SSH2FTPProxyFilter.FTPInput ftpIn

ftpOut

protected com.mindbright.ssh2.SSH2FTPProxyFilter.FTPOutput ftpOut

waitingPASVResponse

protected volatile boolean waitingPASVResponse
Constructor Detail

SSH2FTPProxyFilter

public SSH2FTPProxyFilter(java.lang.String localHost,
                          java.lang.String serverLocalAddr)
                   throws java.net.UnknownHostException
Factory instance constructor


SSH2FTPProxyFilter

public SSH2FTPProxyFilter(java.net.InetAddress localHost,
                          java.net.InetAddress serverLocalAddr)
Factory instance constructor


SSH2FTPProxyFilter

protected SSH2FTPProxyFilter(SSH2Connection connection,
                             SSH2StreamChannel channel,
                             SSH2FTPProxyFilter factory)
Method Detail

createFilter

public SSH2StreamFilter createFilter(SSH2Connection connection,
                                     SSH2StreamChannel channel)
Description copied from interface: SSH2StreamFilterFactory
Instance constructor

Specified by:
createFilter in interface SSH2StreamFilterFactory

getInputFilter

public java.io.InputStream getInputFilter(java.io.InputStream toBeFiltered)
Description copied from interface: SSH2StreamFilter
Get the filter for the input stream.

Specified by:
getInputFilter in interface SSH2StreamFilter
Parameters:
toBeFiltered - The stream to filter.

getOutputFilter

public java.io.OutputStream getOutputFilter(java.io.OutputStream toBeFiltered)
Description copied from interface: SSH2StreamFilter
Get the filter for the output stream.

Specified by:
getOutputFilter in interface SSH2StreamFilter
Parameters:
toBeFiltered - The stream to filter.