java.lang.Object
org.jdrupes.vmoperator.runner.qemu.commands.QmpCommand
Direct Known Subclasses:
QmpAddCpu, QmpCapabilities, QmpChangeMedium, QmpCont, QmpDelCpu, QmpOpenTray, QmpPowerdown, QmpQueryHotpluggableCpus, QmpRemoveMedium, QmpReset, QmpSetBalloon, QmpSetDisplayPassword, QmpSetPasswordExpiry

public abstract class QmpCommand extends Object
The Class QmpCommand.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final com.fasterxml.jackson.databind.ObjectMapper
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the string representation.
    protected static com.fasterxml.jackson.databind.JsonNode
    Parses the json.
    abstract com.fasterxml.jackson.databind.JsonNode
    Returns the Json to be sent to the Qemu process.
    Calls asText() but suppresses the JsonProcessingException.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • mapper

      protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
  • Constructor Details

  • Method Details

    • parseJson

      protected static com.fasterxml.jackson.databind.JsonNode parseJson(String json)
      Parses the json.
      Parameters:
      json - the json
      Returns:
      the json node
    • toJson

      public abstract com.fasterxml.jackson.databind.JsonNode toJson()
      Returns the Json to be sent to the Qemu process.
      Returns:
      the json node
    • asText

      public String asText() throws com.fasterxml.jackson.core.JsonProcessingException
      Returns the string representation.
      Returns:
      the string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - the JSON processing exception
    • toString

      public String toString()
      Calls asText() but suppresses the JsonProcessingException.
      Overrides:
      toString in class Object
      Returns:
      the string