Interface PortForwardingEventListener

All Superinterfaces:
EventListener, org.apache.sshd.common.util.SshdEventListener

public interface PortForwardingEventListener extends org.apache.sshd.common.util.SshdEventListener
Author:
Apache MINA SSHD Project
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    establishedDynamicTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress local, org.apache.sshd.common.util.net.SshdSocketAddress boundAddress, Throwable reason)
    Signals a successful/failed attempt to establish a dynamic port forwarding
    default void
    establishedExplicitTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress local, org.apache.sshd.common.util.net.SshdSocketAddress remote, boolean localForwarding, org.apache.sshd.common.util.net.SshdSocketAddress boundAddress, Throwable reason)
    Signals a successful/failed attempt to establish a local/remote port forwarding
    default void
    establishingDynamicTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress local)
    Signals the attempt to establish a dynamic port forwarding
    default void
    establishingExplicitTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress local, org.apache.sshd.common.util.net.SshdSocketAddress remote, boolean localForwarding)
    Signals the attempt to establish a local/remote port forwarding
    default void
    tearingDownDynamicTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress address)
    Signals a request to tear down a dynamic forwarding
    default void
    tearingDownExplicitTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress address, boolean localForwarding, org.apache.sshd.common.util.net.SshdSocketAddress remoteAddress)
    Signals a request to tear down a local/remote port forwarding
    default void
    tornDownDynamicTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress address, Throwable reason)
    Signals a successful/failed request to tear down a dynamic port forwarding
    default void
    tornDownExplicitTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress address, boolean localForwarding, org.apache.sshd.common.util.net.SshdSocketAddress remoteAddress, Throwable reason)
    Signals a successful/failed request to tear down a local/remote port forwarding
    static <L extends PortForwardingEventListener>
    L
    validateListener(L listener)
     
  • Field Details

  • Method Details

    • establishingExplicitTunnel

      default void establishingExplicitTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress local, org.apache.sshd.common.util.net.SshdSocketAddress remote, boolean localForwarding) throws IOException
      Signals the attempt to establish a local/remote port forwarding
      Parameters:
      session - The Session through which the attempt is made
      local - The local address - may be null on the receiver side
      remote - The remote address - may be null on the receiver side
      localForwarding - 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, org.apache.sshd.common.util.net.SshdSocketAddress local, org.apache.sshd.common.util.net.SshdSocketAddress remote, boolean localForwarding, org.apache.sshd.common.util.net.SshdSocketAddress boundAddress, Throwable reason) throws IOException
      Signals a successful/failed attempt to establish a local/remote port forwarding
      Parameters:
      session - The Session through which the attempt was made
      local - The local address - may be null on the receiver side
      remote - The remote address - may be null on the receiver side
      localForwarding - Local/remote port forwarding indicator
      boundAddress - The bound address - non-null if successful
      reason - 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, org.apache.sshd.common.util.net.SshdSocketAddress address, boolean localForwarding, org.apache.sshd.common.util.net.SshdSocketAddress remoteAddress) throws IOException
      Signals a request to tear down a local/remote port forwarding
      Parameters:
      session - The Session through which the request is made
      address - The (bound) address - local/remote according to the forwarding type
      localForwarding - Local/remote port forwarding indicator
      remoteAddress - The specified peer address when tunnel was established - may be null 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, org.apache.sshd.common.util.net.SshdSocketAddress address, boolean localForwarding, org.apache.sshd.common.util.net.SshdSocketAddress remoteAddress, Throwable reason) throws IOException
      Signals a successful/failed request to tear down a local/remote port forwarding
      Parameters:
      session - The Session through which the request is made
      address - The (bound) address - local/remote according to the forwarding type
      localForwarding - Local/remote port forwarding indicator
      remoteAddress - The specified peer address when tunnel was established - may be null for server-side local tunneling requests
      reason - 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

      default void establishingDynamicTunnel(Session session, org.apache.sshd.common.util.net.SshdSocketAddress local) throws IOException
      Signals the attempt to establish a dynamic port forwarding
      Parameters:
      session - The Session through which the attempt is made
      local - 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, org.apache.sshd.common.util.net.SshdSocketAddress local, org.apache.sshd.common.util.net.SshdSocketAddress boundAddress, Throwable reason) throws IOException
      Signals a successful/failed attempt to establish a dynamic port forwarding
      Parameters:
      session - The Session through which the attempt is made
      local - The local address
      boundAddress - The bound address - non-null if successful
      reason - 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, org.apache.sshd.common.util.net.SshdSocketAddress address) throws IOException
      Signals a request to tear down a dynamic forwarding
      Parameters:
      session - The Session through which the request is made
      address - 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, org.apache.sshd.common.util.net.SshdSocketAddress address, Throwable reason) throws IOException
      Signals a successful/failed request to tear down a dynamic port forwarding
      Parameters:
      session - The Session through which the request is made
      address - The (bound) address - local/remote according to the forwarding type
      reason - 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

      static <L extends PortForwardingEventListener> L validateListener(L listener)