Interface RemoteSession2

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Process exec​(java.lang.String commandName, java.util.Map<java.lang.String,​java.lang.String> environment, int timeout)
      Creates a new remote Process to execute the given command.
    • Method Detail

      • exec

        java.lang.Process exec​(java.lang.String commandName,
                               java.util.Map<java.lang.String,​java.lang.String> environment,
                               int timeout)
                        throws java.io.IOException
        Creates a new remote Process to execute the given command. The returned process's streams exist and are connected, and execution of the process is already started.
        Parameters:
        commandName - command to execute
        environment - environment variables to pass on
        timeout - timeout value, in seconds, for creating the remote process
        Returns:
        a new remote process, already started
        Throws:
        java.io.IOException - may be thrown in several cases. For example, on problems opening input or output streams or on problems connecting or communicating with the remote host. For the latter two cases, a TransportException may be thrown (a subclass of java.io.IOException).