Class TelnetCommandShell

java.lang.Object
org.eclipse.remote.telnet.core.TelnetCommandShell
All Implemented Interfaces:
IRemoteProcess

public class TelnetCommandShell extends Object implements IRemoteProcess
  • Constructor Details

  • Method Details

    • destroy

      public void destroy()
      Description copied from interface: IRemoteProcess
      Terminate the process
      Specified by:
      destroy in interface IRemoteProcess
    • exitValue

      public int exitValue()
      Description copied from interface: IRemoteProcess
      Returns the exit value for the process
      Specified by:
      exitValue in interface IRemoteProcess
      Returns:
      the exit value
    • getErrorStream

      public InputStream getErrorStream()
      Description copied from interface: IRemoteProcess
      Gets the error output stream of the process Note: some implementations (e.g. JSch) will not work correctly if the remote process generates stdout or stderr but the calling thread does not read the corresponding output or error streams.
      Specified by:
      getErrorStream in interface IRemoteProcess
      Returns:
      the output stream connected to the standard error of the process
    • getInputStream

      public InputStream getInputStream()
      Description copied from interface: IRemoteProcess
      Gets an InputStream which can be used to read the standard output stream of the process Note: some implementations (e.g. JSch) will not work correctly if the remote process generates stdout or stderr but the calling thread does not read the corresponding input or error streams.
      Specified by:
      getInputStream in interface IRemoteProcess
      Returns:
      the input stream connected to the standard output of the process
    • getOutputStream

      public OutputStream getOutputStream()
      Description copied from interface: IRemoteProcess
      Gets an output stream which can be used to write to the standard input stream of the process
      Specified by:
      getOutputStream in interface IRemoteProcess
      Returns:
      the output stream connected to the standard input of the process
    • waitFor

      public int waitFor() throws InterruptedException
      Description copied from interface: IRemoteProcess
      Wait until the process has terminated Note: some implementations (e.g. JSch) will not work correctly if the remote process generates stdout or stderr but the calling thread does not read the corresponding input or error streams.
      Specified by:
      waitFor in interface IRemoteProcess
      Returns:
      the exit value of the process
      Throws:
      InterruptedException - if the current thread is interrupted by another thread while it is waiting
    • isCompleted

      public boolean isCompleted()
      Description copied from interface: IRemoteProcess
      Check if the remote process has completed. Note: some implementations (e.g. JSch) will not work correctly if the remote process generates stdout or stderr but the calling thread does not read the corresponding input or error streams.
      Specified by:
      isCompleted in interface IRemoteProcess
      Returns:
      true if remote process has completed
    • getRemoteConnection

      public IRemoteConnection getRemoteConnection()
      Description copied from interface: IRemoteProcess
      Get the connection that is used by this process
      Specified by:
      getRemoteConnection in interface IRemoteProcess
      Returns:
      connection used by this process
    • getService

      public <T extends IRemoteProcess.Service> T getService(Class<T> service)
      Description copied from interface: IRemoteProcess
      Get the service for this remote process that implements the given interface.
      Specified by:
      getService in interface IRemoteProcess
      Parameters:
      service - the interface the required service must implements
      Returns:
      the desired service or null if there is no such service available
    • hasService

      public <T extends IRemoteProcess.Service> boolean hasService(Class<T> service)
      Description copied from interface: IRemoteProcess
      Does this remote process support the given service.
      Specified by:
      hasService in interface IRemoteProcess
      Parameters:
      service - The service to be tested
      Returns:
      true if this connection supports the service
    • getProcessBuilder

      public IRemoteProcessBuilder getProcessBuilder()
      Description copied from interface: IRemoteProcess
      Get the process builder used to create this process
      Specified by:
      getProcessBuilder in interface IRemoteProcess
      Returns:
      process builder used to create this process
    • connect

      public void connect() throws RemoteConnectionException
      Throws:
      RemoteConnectionException
    • terminated

      protected void terminated()