Interface ForwardingChannelFactory<T extends SshContext>

All Known Implementing Classes:
SocketListeningForwardingChannelFactoryImpl

public interface ForwardingChannelFactory<T extends SshContext>
This interface defines the behaviour for remote forwarding requests. When an SSH client requests a remote forwarding we typically open a server socket, accept connections and open remote forwarding channels on the client.
  • Method Details

    • bindInterface

      int bindInterface(String addressToBind, int portToBind, ConnectionProtocol<T> connection) throws IOException
      A client has requested that the server start listening and forward any subsequent connections to the client.
      Parameters:
      addressToBind - String
      portToBind - int
      connection - ConnectionProtocol
      Throws:
      IOException
    • bindInterface

      int bindInterface(String addressToBind, int portToBind, ConnectionProtocol<?> connection, String channelType) throws IOException
      Parameters:
      addressToBind -
      portToBind -
      connection -
      channelType -
      Throws:
      IOException
    • belongsTo

      boolean belongsTo(ConnectionProtocol<T> connection)
      Does this factory belong to the connection provided?
      Parameters:
      connection - ConnectionProtocol
      Returns:
      boolean
    • stopListening

      void stopListening(boolean dropActiveTunnels)
      Stop listening on active interfaces.
      Parameters:
      dropActiveTunnels - boolean
    • getChannelType

      String getChannelType()
      Get the underlying channel type for this forwarding factory.
    • getStartedEventCode

      int getStartedEventCode()
    • getStoppedEventCode

      int getStoppedEventCode()
    • getActiveTunnelManager