Package org.apache.sshd.common.forward
Interface PortForwardingEventListener
- All Superinterfaces:
EventListener
,SshdEventListener
- Author:
- Apache MINA SSHD Project
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
establishedDynamicTunnel
(Session session, SshdSocketAddress local, SshdSocketAddress boundAddress, Throwable reason) Signals a successful/failed attempt to establish a dynamic port forwardingdefault 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 forwardingdefault void
establishingDynamicTunnel
(Session session, SshdSocketAddress local) Signals the attempt to establish a dynamic port forwardingdefault void
establishingExplicitTunnel
(Session session, SshdSocketAddress local, SshdSocketAddress remote, boolean localForwarding) Signals the attempt to establish a local/remote port forwardingdefault void
tearingDownDynamicTunnel
(Session session, SshdSocketAddress address) Signals a request to tear down a dynamic forwardingdefault void
tearingDownExplicitTunnel
(Session session, SshdSocketAddress address, boolean localForwarding, SshdSocketAddress remoteAddress) Signals a request to tear down a local/remote port forwardingdefault void
tornDownDynamicTunnel
(Session session, SshdSocketAddress address, Throwable reason) Signals a successful/failed request to tear down a dynamic port forwardingdefault void
tornDownExplicitTunnel
(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
- TheSession
through which the attempt is madelocal
- The local address - may benull
on the receiver sideremote
- The remote address - may benull
on 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
- TheSession
through which the attempt was madelocal
- The local address - may benull
on the receiver sideremote
- The remote address - may benull
on the receiver sidelocalForwarding
- Local/remote port forwarding indicatorboundAddress
- The bound address - non-null
if successfulreason
- Reason for failure -null
if 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
- TheSession
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 benull
for 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
- TheSession
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 benull
for server-side local tunneling requestsreason
- Reason for failure -null
if 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
- TheSession
through 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
- TheSession
through which the attempt is madelocal
- The local addressboundAddress
- The bound address - non-null
if successfulreason
- Reason for failure -null
if 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
- TheSession
through 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
- TheSession
through which the request is madeaddress
- The (bound) address - local/remote according to the forwarding typereason
- Reason for failure -null
if 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
-