Class LocalPortForwarder


  • public class LocalPortForwarder
    extends java.lang.Object
    • Method Summary

      Modifier and Type Method Description
      void close()
      Close the ServerSocket that's listening for connections to forward.
      boolean isRunning()
      Returns whether this listener is running (ie.
      void listen()
      Start listening for incoming connections and forward to remote host as a channel.
      void listen​(java.lang.Thread runningThread)
      Start listening for incoming connections and forward to remote host as a channel and ensure that the thread is registered.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • listen

        public void listen()
                    throws java.io.IOException
        Start listening for incoming connections and forward to remote host as a channel.
        Throws:
        java.io.IOException
      • isRunning

        public boolean isRunning()
        Returns whether this listener is running (ie. whether a thread is attached to it).
        Returns:
      • listen

        public void listen​(java.lang.Thread runningThread)
                    throws java.io.IOException
        Start listening for incoming connections and forward to remote host as a channel and ensure that the thread is registered. This is useful if for instance is called from another thread
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Close the ServerSocket that's listening for connections to forward.
        Throws:
        java.io.IOException