Class SshSpawn2

    • Constructor Summary

      Constructors 
      Constructor Description
      SshSpawn2​(java.lang.String remoteHostName, int remotePort, java.lang.String username, java.lang.String password)
      Construct a new SSH spawn.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getExitValue()
      Get exit value
      java.io.InputStream getStderr()
      Get the standard error input stream
      java.io.OutputStream getStdin()
      Get the standard in output stream
      java.io.InputStream getStdout()
      Get the standard out input stream
      boolean isClosed()
      Whether if ssh spawn closed
      void start()
      Start ssh spawn
      void stop()
      Stop the ssh spawn
      • Methods inherited from class java.lang.Object

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

      • SshSpawn2

        public SshSpawn2​(java.lang.String remoteHostName,
                         int remotePort,
                         java.lang.String username,
                         java.lang.String password)
        Construct a new SSH spawn.
        Parameters:
        remoteHostName - The remote host to connect to.
        remotePort - The remote port to connect to.
        username - The user name with which to authenticate
        password - The password with which to authenticate
    • Method Detail

      • start

        public void start()
                   throws java.io.IOException
        Start ssh spawn
        Specified by:
        start in interface Spawnable
        Throws:
        java.io.IOException - If connecting the channel fails
      • getStdout

        public java.io.InputStream getStdout()
        Get the standard out input stream
        Specified by:
        getStdout in interface Spawnable
        Returns:
        Standard out input stream
        See Also:
        Process.getInputStream()
      • getStdin

        public java.io.OutputStream getStdin()
        Get the standard in output stream
        Specified by:
        getStdin in interface Spawnable
        Returns:
        Standard in output stream
        See Also:
        Process.getOutputStream()
      • getStderr

        public java.io.InputStream getStderr()
        Get the standard error input stream
        Specified by:
        getStderr in interface Spawnable
        Returns:
        Standard error input stream
        See Also:
        Process.getErrorStream()
      • isClosed

        public boolean isClosed()
        Whether if ssh spawn closed
        Specified by:
        isClosed in interface Spawnable
        Returns:
        Whether if ssh spawn closed
      • stop

        public void stop()
        Stop the ssh spawn
        Specified by:
        stop in interface Spawnable