public class DefaultTcpipForwarder extends CloseableUtils.AbstractInnerCloseable implements TcpipForwarder, IoHandler
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
|
void |
exceptionCaught(IoSession session,
Throwable cause) |
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.
|
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.
|
String |
toString() |
doCloseGracefully, doCloseImmediatelybuilder, close, isClosed, isClosing, preCloseprotected IoAcceptor acceptor
public DefaultTcpipForwarder(ConnectionService service)
public SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException
TcpipForwarderstartLocalPortForwarding in interface TcpipForwarderIOExceptionpublic void stopLocalPortForwarding(SshdSocketAddress local) throws IOException
TcpipForwarderstopLocalPortForwarding in interface TcpipForwarderIOExceptionpublic SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException
TcpipForwarderstartRemotePortForwarding in interface TcpipForwarderIOExceptionpublic void stopRemotePortForwarding(SshdSocketAddress remote) throws IOException
TcpipForwarderstopRemotePortForwarding in interface TcpipForwarderIOExceptionpublic SshdSocketAddress getForwardedPort(int remotePort)
TcpipForwardergetForwardedPort in interface TcpipForwarderpublic SshdSocketAddress localPortForwardingRequested(SshdSocketAddress local) throws IOException
TcpipForwarderlocalPortForwardingRequested in interface TcpipForwarderIOExceptionpublic void localPortForwardingCancelled(SshdSocketAddress local) throws IOException
TcpipForwarderlocalPortForwardingCancelled in interface TcpipForwarderIOExceptionpublic void close()
TcpipForwarderclose in interface TcpipForwarderprotected Closeable getInnerCloseable()
getInnerCloseable in class CloseableUtils.AbstractInnerCloseablepublic void sessionCreated(IoSession session) throws Exception
sessionCreated in interface IoHandlerExceptionpublic void sessionClosed(IoSession session) throws Exception
sessionClosed in interface IoHandlerExceptionpublic void messageReceived(IoSession session, Readable message) throws Exception
messageReceived in interface IoHandlerExceptionpublic void exceptionCaught(IoSession session, Throwable cause) throws Exception
exceptionCaught in interface IoHandlerExceptionCopyright © 2008–2014 The Apache Software Foundation. All rights reserved.