Package org.apache.sshd.common.forward
Interface PortForwardingEventListener
- All Superinterfaces:
EventListener,SshdEventListener
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidestablishedDynamicTunnel(Session session, SshdSocketAddress local, SshdSocketAddress boundAddress, Throwable reason) Signals a successful/failed attempt to establish a dynamic port forwardingdefault voidestablishedExplicitTunnel(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding, SshdSocketAddress boundAddress, Throwable reason) Signals a successful/failed attempt to establish a local/remote port forwardingdefault voidestablishingDynamicTunnel(Session session, SshdSocketAddress local) Signals the attempt to establish a dynamic port forwardingdefault voidestablishingExplicitTunnel(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding) Signals the attempt to establish a local/remote port forwardingdefault voidtearingDownDynamicTunnel(Session session, SshdSocketAddress address) Signals a request to tear down a dynamic forwardingdefault voidtearingDownExplicitTunnel(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress) Signals a request to tear down a local/remote port forwardingdefault voidtornDownDynamicTunnel(Session session, SshdSocketAddress address, Throwable reason) Signals a successful/failed request to tear down a dynamic port forwardingdefault voidtornDownExplicitTunnel(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress, Throwable reason) Signals a successful/failed request to tear down a local/remote port forwardingstatic <L extends PortForwardingEventListener>
LvalidateListener(L listener)
-
Field Details
-
EMPTY
-
-
Method Details
-
establishingExplicitTunnel
default void establishingExplicitTunnel(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding) throws IOException Signals the attempt to establish a local/remote port forwarding- Parameters:
session- TheSessionthrough which the attempt is madelocal- The local address - may benullon the receiver sideremote- The remote address - may benullon the receiver sidelocalForwarding- Local/remote port forwarding indicator- Throws:
IOException- If failed to handle the event - in which case the attempt is aborted and the exception re-thrown to the caller
-
establishedExplicitTunnel
default void establishedExplicitTunnel(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding, SshdSocketAddress boundAddress, Throwable reason) throws IOException Signals a successful/failed attempt to establish a local/remote port forwarding- Parameters:
session- TheSessionthrough which the attempt was madelocal- The local address - may benullon the receiver sideremote- The remote address - may benullon the receiver sidelocalForwarding- Local/remote port forwarding indicatorboundAddress- The bound address - non-nullif successfulreason- Reason for failure -nullif successful- Throws:
IOException- If failed to handle the event - in which case the established tunnel is aborted
-
tearingDownExplicitTunnel
default void tearingDownExplicitTunnel(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress) throws IOException Signals a request to tear down a local/remote port forwarding- Parameters:
session- TheSessionthrough 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 benullfor server-side local tunneling requests- Throws:
IOException- If failed to handle the event - in which case the request is aborted
-
tornDownExplicitTunnel
default void tornDownExplicitTunnel(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress, Throwable reason) throws IOException Signals a successful/failed request to tear down a local/remote port forwarding- Parameters:
session- TheSessionthrough 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 benullfor server-side local tunneling requestsreason- Reason for failure -nullif successful- Throws:
IOException- If failed to handle the event - Note: the exception is propagated, but the port forwarding may have been torn down - no rollback
-
establishingDynamicTunnel
Signals the attempt to establish a dynamic port forwarding- Parameters:
session- TheSessionthrough which the attempt is madelocal- The local address- Throws:
IOException- If failed to handle the event - in which case the attempt is aborted and the exception re-thrown to the caller
-
establishedDynamicTunnel
default void establishedDynamicTunnel(Session session, SshdSocketAddress local, SshdSocketAddress boundAddress, Throwable reason) throws IOException Signals a successful/failed attempt to establish a dynamic port forwarding- Parameters:
session- TheSessionthrough which the attempt is madelocal- The local addressboundAddress- The bound address - non-nullif successfulreason- Reason for failure -nullif successful- Throws:
IOException- If failed to handle the event - in which case the established tunnel is aborted
-
tearingDownDynamicTunnel
default void tearingDownDynamicTunnel(Session session, SshdSocketAddress address) throws IOException Signals a request to tear down a dynamic forwarding- Parameters:
session- TheSessionthrough which the request is madeaddress- The (bound) address - local/remote according to the forwarding type- Throws:
IOException- If failed to handle the event - in which case the request is aborted
-
tornDownDynamicTunnel
default void tornDownDynamicTunnel(Session session, SshdSocketAddress address, Throwable reason) throws IOException Signals a successful/failed request to tear down a dynamic port forwarding- Parameters:
session- TheSessionthrough which the request is madeaddress- The (bound) address - local/remote according to the forwarding typereason- Reason for failure -nullif successful- Throws:
IOException- If failed to handle the event - Note: the exception is propagated, but the port forwarding may have been torn down - no rollback
-
validateListener
-