net.schmizz.sshj.connection.channel.forwarded
Class SocketForwardingConnectListener

java.lang.Object
  extended by net.schmizz.sshj.connection.channel.forwarded.SocketForwardingConnectListener
All Implemented Interfaces:
ConnectListener

public class SocketForwardingConnectListener
extends Object
implements ConnectListener

A ConnectListener that forwards what is received over the channel to a socket and vice-versa.


Field Summary
protected  SocketAddress addr
           
protected  org.slf4j.Logger log
           
 
Constructor Summary
SocketForwardingConnectListener(SocketAddress addr)
          Create with a SocketAddress this listener will forward to.
 
Method Summary
 void gotConnect(Channel.Forwarded chan)
          On connect, confirm the channel and start forwarding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log

addr

protected final SocketAddress addr
Constructor Detail

SocketForwardingConnectListener

public SocketForwardingConnectListener(SocketAddress addr)
Create with a SocketAddress this listener will forward to.

Method Detail

gotConnect

public void gotConnect(Channel.Forwarded chan)
                throws IOException
On connect, confirm the channel and start forwarding.

Specified by:
gotConnect in interface ConnectListener
Parameters:
chan - the forwarded channel
Throws:
IOException - if there is a problem handling the channel


Copyright © 2009-2012. All Rights Reserved.