Class SocketForwardingConnectListener
- java.lang.Object
-
- net.schmizz.sshj.connection.channel.forwarded.SocketForwardingConnectListener
-
- All Implemented Interfaces:
ConnectListener
public class SocketForwardingConnectListener extends java.lang.Object implements ConnectListener
AConnectListener
that forwards what is received over the channel to a socket and vice-versa.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.net.SocketAddress
addr
-
Constructor Summary
Constructors Constructor Description SocketForwardingConnectListener(java.net.SocketAddress addr)
Create with aSocketAddress
this listener will forward to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
gotConnect(Channel.Forwarded chan)
On connect, confirm the channel and start forwarding.
-
-
-
Method Detail
-
gotConnect
public void gotConnect(Channel.Forwarded chan) throws java.io.IOException
On connect, confirm the channel and start forwarding.- Specified by:
gotConnect
in interfaceConnectListener
- Parameters:
chan
- the forwarded channel- Throws:
java.io.IOException
- if there is a problem handling the channel
-
-