Interface RemoteSession

  • All Known Subinterfaces:
    All Known Implementing Classes:
    JschSession, SshdSession

    public interface RemoteSession
    An abstraction of a remote "session" for executing remote commands.
    • Method Detail

      • exec

        Process exec​(String commandName,
                     int timeout)
              throws 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.
        commandName - command to execute
        timeout - timeout value, in seconds, for creating the remote process
        a new remote process, already started
        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
      • disconnect

        void disconnect()
        Disconnects the remote session.