Class ForkAbstract

java.lang.Object
ecmwf.common.technical.ForkAbstract
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
ForkECios, ForkExec

public abstract class ForkAbstract extends Object implements Closeable
The Class ForkAbstract.
  • Field Details

  • Constructor Details

    • ForkAbstract

      public ForkAbstract()
  • Method Details

    • setKillOnTimeOut

      public void setKillOnTimeOut(boolean killOnTimeOut)
      Sets the kill on time out.
      Parameters:
      killOnTimeOut - the new kill on time out
    • toString

      protected String toString(String[] args)
      Converts into string.
      Parameters:
      args - the args
      Returns:
      the string
    • check

      public boolean check() throws IOException
      Check.
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • check

      public boolean check(String[][] errors) throws IOException
      Check.
      Parameters:
      errors - the errors
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • check

      public boolean check(String[][] expect, String[][] errors) throws IOException
      Check.
      Parameters:
      expect - the expect
      errors - the errors
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • close

      public abstract void close()
      Close.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getCommand

      public abstract String getCommand()
      Gets the command.
      Returns:
      the command
    • getError

      public String getError()
      Gets the error.
      Returns:
      the error
    • getMessage

      public String getMessage()
      Gets the message.
      Returns:
      the message
    • start

      public abstract void start() throws IOException
      Start.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • kill

      public abstract boolean kill()
      Kill.
      Returns:
      true, if successful
    • getInputStream

      public abstract InputStream getInputStream() throws IOException
      Gets the input stream.
      Returns:
      the input stream
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • interrupted

      public long interrupted()
      Interrupted.
      Returns:
      the long
    • restarted

      public void restarted()
      Restarted.
    • writeInto

      public int writeInto(OutputStream out) throws IOException
      Write into.
      Parameters:
      out - the out
      Returns:
      the int
      Throws:
      IOException - Signals that an I/O exception has occurred.