Class MachineDialogParser

java.lang.Object
org.ovirt.otopi.dialog.MachineDialogParser

public class MachineDialogParser extends Object
Machine dialog parser. Please refer to README.dialog.
  • Field Details

  • Constructor Details

    • MachineDialogParser

      public MachineDialogParser()
  • Method Details

    • _parseRequest

      private Event.Base _parseRequest(String request, OutputStream out) throws Exception
      Throws:
      Exception
    • setStreams

      public void setStreams(InputStream incoming, OutputStream outgoing)
      Set the dialog streams.
      Parameters:
      incoming - incoming stream.
      outgoing - outgoing stream.
    • cliEnvironmentGet

      public Object cliEnvironmentGet(String name) throws IOException
      env-get command.
      Parameters:
      name - variable name.
      Returns:
      variable value (null, Integer, String, String[])
      Throws:
      IOException - on unexpected connection termination
    • cliEnvironmentSet

      public void cliEnvironmentSet(String name, Object value) throws IOException
      env-set command.
      Parameters:
      name - variable name.
      value - value to set, type of object is attached (null, Integer, String, String[]).
      Throws:
      IOException - on unexpected connection termination
    • cliDownloadLog

      public void cliDownloadLog(OutputStream out) throws IOException
      log command.
      Parameters:
      out - stream to write log into.
      Throws:
      IOException - on unexpected connection termination
    • cliNoop

      public void cliNoop() throws IOException
      noop command.
      Throws:
      IOException - on unexpected connection termination
    • cliQuit

      public void cliQuit() throws IOException
      quit command.
      Throws:
      IOException - on unexpected connection termination
    • cliInstall

      public void cliInstall() throws IOException
      install command.
      Throws:
      IOException - on unexpected connection termination
    • cliAbort

      public void cliAbort() throws IOException
      abort command.
      Throws:
      IOException - on unexpected connection termination
    • nextEvent

      public Event.Base nextEvent(OutputStream out) throws IOException, SoftError
      Get next event from stream.
      Parameters:
      out - output stream for multistring display.
      Returns:
      Next event in stream.
      Throws:
      IOException - on unexpected connection termination
      SoftError
    • nextEvent

      public Event.Base nextEvent() throws IOException
      Get next event from stream.
      Returns:
      Next event in stream.
      Throws:
      IOException - on unexpected connection termination
    • sendResponse

      public void sendResponse(Event.Base bevent)
      Send response of an event.
      Parameters:
      bevent - event that holds the response.