public class DefaultTcpipForwarder extends CloseableUtils.AbstractInnerCloseable implements TcpipForwarder
CloseableUtils.AbstractCloseable.State
Modifier and Type | Field and Description |
---|---|
protected IoAcceptor |
acceptor |
closeFuture, lock, log, state
Constructor and Description |
---|
DefaultTcpipForwarder(ConnectionService service) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the forwarder
|
SshdSocketAddress |
getForwardedPort(int remotePort)
Retrieve the local address that the remote port is forwarded to
|
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 tcpip 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, doCloseImmediately
builder, close, isClosed, isClosing, preClose
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 startDynamicPortForwarding(SshdSocketAddress local) throws IOException
startDynamicPortForwarding
in interface TcpipForwarder
IOException
public void stopDynamicPortForwarding(SshdSocketAddress local) throws IOException
stopDynamicPortForwarding
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 close()
TcpipForwarder
close
in interface TcpipForwarder
protected Closeable getInnerCloseable()
getInnerCloseable
in class CloseableUtils.AbstractInnerCloseable
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.