Class JsonResponseUtil

java.lang.Object
org.ovirt.vdsm.jsonrpc.client.utils.JsonResponseUtil

public class JsonResponseUtil extends Object
  • Field Details

  • Constructor Details

    • JsonResponseUtil

      public JsonResponseUtil()
  • Method Details

    • populate

      public Map<String,Object> populate(JsonRpcResponse response)
    • updateResponse

      private void updateResponse(Object object)
    • checkAndUpdateStatus

      private void checkAndUpdateStatus()
    • withResponseKey

      public JsonResponseUtil withResponseKey(String responseKey)
      Parameters:
      responseKey - - Key used to store response value in result Map.
      Returns:
      this JsonResponseUtil.
    • withResponseType

      public JsonResponseUtil withResponseType(Class<?> clazz)
      Parameters:
      clazz - - A type of response which will be use instead of default Map.
      Returns:
      this JsonResponseUtil.
    • withIgnoreResponseKey

      public JsonResponseUtil withIgnoreResponseKey()
      During response decomposition we will ignore default key and use raw response structure as result Map.
      Returns:
      this JsonResponseUtil.
    • withSubtypeKey

      public JsonResponseUtil withSubtypeKey(String subTypeKey)
      Parameters:
      subTypeKey - - Key which is used to put subtype to result map.
      Returns:
      this JsonResponseUtil.
    • withSubTypeClazz

      public JsonResponseUtil withSubTypeClazz(Class<?> clazz)
      Parameters:
      clazz - - type of the subtype.
      Returns:
      this JsonResponseUtil.