public class DefaultTcpipForwarder extends CloseableUtils.AbstractInnerCloseable implements TcpipForwarder
CloseableUtils.AbstractCloseable.StatecloseFuture, lock, statelog| Constructor and Description |
|---|
DefaultTcpipForwarder(ConnectionService service) |
| Modifier and Type | Method and Description |
|---|---|
ConnectionService |
getConnectionService() |
SshdSocketAddress |
getForwardedPort(int remotePort) |
protected Closeable |
getInnerCloseable() |
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.
|
SshdSocketAddress |
startDynamicPortForwarding(SshdSocketAddress local) |
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 tcp/ip from the given remote address to the
given local address.
|
void |
stopDynamicPortForwarding(SshdSocketAddress local) |
void |
stopLocalPortForwarding(SshdSocketAddress local)
Stop forwarding the given local address.
|
void |
stopRemotePortForwarding(SshdSocketAddress remote)
Stop forwarding of the given remote address.
|
String |
toString() |
doCloseGracefully, doCloseImmediatelybuilder, close, isClosed, isClosing, preCloseclose, isOpenpublic DefaultTcpipForwarder(ConnectionService service)
public final ConnectionService getConnectionService()
public SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException
TcpipForwarderstartLocalPortForwarding in interface TcpipForwarderlocal - The local addressremote - The remote addressSshdSocketAddressIOException - If failed to handle requestpublic void stopLocalPortForwarding(SshdSocketAddress local) throws IOException
TcpipForwarderstopLocalPortForwarding in interface TcpipForwarderlocal - The local addressIOException - If failed to handle requestpublic SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException
TcpipForwarderStart forwarding tcp/ip from the given remote address to the given local address.
The remote host name is the address to bind to on the server:
startRemotePortForwarding in interface TcpipForwarderremote - The remote addresslocal - The local addressSshdSocketAddressIOException - If failed to handle requestpublic void stopRemotePortForwarding(SshdSocketAddress remote) throws IOException
TcpipForwarderstopRemotePortForwarding in interface TcpipForwarderremote - The remote SshdSocketAddressIOException - If failed to handle requestpublic SshdSocketAddress startDynamicPortForwarding(SshdSocketAddress local) throws IOException
startDynamicPortForwarding in interface TcpipForwarderIOExceptionpublic void stopDynamicPortForwarding(SshdSocketAddress local) throws IOException
stopDynamicPortForwarding in interface TcpipForwarderIOExceptionpublic SshdSocketAddress getForwardedPort(int remotePort)
getForwardedPort in interface TcpipForwarderremotePort - The remote portSshdSocketAddress that the remote port is forwarded topublic SshdSocketAddress localPortForwardingRequested(SshdSocketAddress local) throws IOException
TcpipForwarderlocalPortForwardingRequested in interface TcpipForwarderlocal - The request addressIOException - If failed to handle requestpublic void localPortForwardingCancelled(SshdSocketAddress local) throws IOException
TcpipForwarderlocalPortForwardingCancelled in interface TcpipForwarderlocal - The local SshdSocketAddressIOException - If failed to handle requestprotected Closeable getInnerCloseable()
getInnerCloseable in class CloseableUtils.AbstractInnerCloseableCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.