public interface PortForwardingEventListener extends SshdEventListener
| Modifier and Type | Field and Description |
|---|---|
static PortForwardingEventListener |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
default void |
establishedDynamicTunnel(Session session,
SshdSocketAddress local,
SshdSocketAddress boundAddress,
Throwable reason)
Signals a successful/failed attempt to establish a dynamic port forwarding
|
default void |
establishedExplicitTunnel(Session session,
SshdSocketAddress local,
SshdSocketAddress remote,
boolean localForwarding,
SshdSocketAddress boundAddress,
Throwable reason)
Signals a successful/failed attempt to establish a local/remote port forwarding
|
default void |
establishingDynamicTunnel(Session session,
SshdSocketAddress local)
Signals the attempt to establish a dynamic port forwarding
|
default void |
establishingExplicitTunnel(Session session,
SshdSocketAddress local,
SshdSocketAddress remote,
boolean localForwarding)
Signals the attempt to establish a local/remote port forwarding
|
default void |
tearingDownDynamicTunnel(Session session,
SshdSocketAddress address)
Signals a request to tear down a dynamic forwarding
|
default void |
tearingDownExplicitTunnel(Session session,
SshdSocketAddress address,
boolean localForwarding,
SshdSocketAddress remoteAddress)
Signals a request to tear down a local/remote port forwarding
|
default void |
tornDownDynamicTunnel(Session session,
SshdSocketAddress address,
Throwable reason)
Signals a successful/failed request to tear down a dynamic port forwarding
|
default void |
tornDownExplicitTunnel(Session session,
SshdSocketAddress address,
boolean localForwarding,
SshdSocketAddress remoteAddress,
Throwable reason)
Signals a successful/failed request to tear down a local/remote port forwarding
|
static <L extends PortForwardingEventListener> |
validateListener(L listener) |
validateListenerstatic final PortForwardingEventListener EMPTY
default void establishingExplicitTunnel(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding) throws IOException
session - The Session through which the attempt is madelocal - The local address - may be null on the receiver sideremote - The remote address - may be null on the receiver sidelocalForwarding - Local/remote port forwarding indicatorIOException - If failed to handle the event - in which case the attempt is aborted and the exception
re-thrown to the callerdefault void establishedExplicitTunnel(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding, SshdSocketAddress boundAddress, Throwable reason) throws IOException
session - The Session through which the attempt was madelocal - The local address - may be null on the receiver sideremote - The remote address - may be null on the receiver sidelocalForwarding - Local/remote port forwarding indicatorboundAddress - The bound address - non-null if successfulreason - Reason for failure - null if successfulIOException - If failed to handle the event - in which case the established tunnel is aborteddefault void tearingDownExplicitTunnel(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress) throws IOException
session - The Session through which the request is madeaddress - The (bound) address - local/remote according to the forwarding typelocalForwarding - Local/remote port forwarding indicatorremoteAddress - The specified peer address when tunnel was established - may be null for
server-side local tunneling requestsIOException - If failed to handle the event - in which case the request is aborteddefault void tornDownExplicitTunnel(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress, Throwable reason) throws IOException
session - The Session through which the request is madeaddress - The (bound) address - local/remote according to the forwarding typelocalForwarding - Local/remote port forwarding indicatorremoteAddress - The specified peer address when tunnel was established - may be null for
server-side local tunneling requestsreason - Reason for failure - null if successfulIOException - If failed to handle the event - Note: the exception is propagated, but the port
forwarding may have been torn down - no rollbackdefault void establishingDynamicTunnel(Session session, SshdSocketAddress local) throws IOException
session - The Session through which the attempt is madelocal - The local addressIOException - If failed to handle the event - in which case the attempt is aborted and the exception
re-thrown to the callerdefault void establishedDynamicTunnel(Session session, SshdSocketAddress local, SshdSocketAddress boundAddress, Throwable reason) throws IOException
session - The Session through which the attempt is madelocal - The local addressboundAddress - The bound address - non-null if successfulreason - Reason for failure - null if successfulIOException - If failed to handle the event - in which case the established tunnel is aborteddefault void tearingDownDynamicTunnel(Session session, SshdSocketAddress address) throws IOException
session - The Session through which the request is madeaddress - The (bound) address - local/remote according to the forwarding typeIOException - If failed to handle the event - in which case the request is aborteddefault void tornDownDynamicTunnel(Session session, SshdSocketAddress address, Throwable reason) throws IOException
session - The Session through which the request is madeaddress - The (bound) address - local/remote according to the forwarding typereason - Reason for failure - null if successfulIOException - If failed to handle the event - Note: the exception is propagated, but the port
forwarding may have been torn down - no rollbackstatic <L extends PortForwardingEventListener> L validateListener(L listener)
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.