public class DefaultTcpipForwarder extends Object implements TcpipForwarder, IoHandler
Modifier and Type | Field and Description |
---|---|
protected IoAcceptor |
acceptor |
Constructor and Description |
---|
DefaultTcpipForwarder(ConnectionService service) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the forwarder
|
CloseFuture |
close(boolean immediately)
Close this resource asynchronously and return a future.
|
void |
exceptionCaught(IoSession session,
Throwable cause) |
SshdSocketAddress |
getForwardedPort(int remotePort)
Retrieve the local address that the remote port is forwarded to
|
void |
initialize() |
void |
localPortForwardingCancelled(SshdSocketAddress local)
Called when the other side cancelled a remote port forward.
|
SshdSocketAddress |
localPortForwardingRequested(SshdSocketAddress local)
Called when the other side requested a remote port forward.
|
void |
messageReceived(IoSession session,
Readable message) |
void |
sessionClosed(IoSession session) |
void |
sessionCreated(IoSession session) |
SshdSocketAddress |
startLocalPortForwarding(SshdSocketAddress local,
SshdSocketAddress remote)
Start forwarding the given local address on the client to the given address on the server.
|
SshdSocketAddress |
startRemotePortForwarding(SshdSocketAddress remote,
SshdSocketAddress local)
Start forwarding tcpip from the given remote address to the
given local address.
|
void |
stopLocalPortForwarding(SshdSocketAddress local)
Stop forwarding the given local address.
|
void |
stopRemotePortForwarding(SshdSocketAddress remote)
Stop forwarding of the given remote address.
|
protected IoAcceptor acceptor
public DefaultTcpipForwarder(ConnectionService service)
public SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException
TcpipForwarder
startLocalPortForwarding
in interface TcpipForwarder
IOException
public void stopLocalPortForwarding(SshdSocketAddress local) throws IOException
TcpipForwarder
stopLocalPortForwarding
in interface TcpipForwarder
IOException
public SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException
TcpipForwarder
startRemotePortForwarding
in interface TcpipForwarder
IOException
public void stopRemotePortForwarding(SshdSocketAddress remote) throws IOException
TcpipForwarder
stopRemotePortForwarding
in interface TcpipForwarder
IOException
public SshdSocketAddress getForwardedPort(int remotePort)
TcpipForwarder
getForwardedPort
in interface TcpipForwarder
public SshdSocketAddress localPortForwardingRequested(SshdSocketAddress local) throws IOException
TcpipForwarder
localPortForwardingRequested
in interface TcpipForwarder
IOException
public void localPortForwardingCancelled(SshdSocketAddress local) throws IOException
TcpipForwarder
localPortForwardingCancelled
in interface TcpipForwarder
IOException
public void initialize()
public void close()
TcpipForwarder
close
in interface TcpipForwarder
public CloseFuture close(boolean immediately)
Closeable
public void sessionCreated(IoSession session) throws Exception
sessionCreated
in interface IoHandler
Exception
public void sessionClosed(IoSession session) throws Exception
sessionClosed
in interface IoHandler
Exception
public void messageReceived(IoSession session, Readable message) throws Exception
messageReceived
in interface IoHandler
Exception
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.