Class JsonResponseUtil
- java.lang.Object
-
- org.ovirt.vdsm.jsonrpc.client.utils.JsonResponseUtil
-
public class JsonResponseUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JsonResponseUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
populate(JsonRpcResponse response)
JsonResponseUtil
withIgnoreResponseKey()
During response decomposition we will ignore default key and use raw response structure as resultMap
.JsonResponseUtil
withResponseKey(java.lang.String responseKey)
JsonResponseUtil
withResponseType(java.lang.Class<?> clazz)
JsonResponseUtil
withSubTypeClazz(java.lang.Class<?> clazz)
JsonResponseUtil
withSubtypeKey(java.lang.String subTypeKey)
-
-
-
Method Detail
-
populate
public java.util.Map<java.lang.String,java.lang.Object> populate(JsonRpcResponse response)
-
withResponseKey
public JsonResponseUtil withResponseKey(java.lang.String responseKey)
- Parameters:
responseKey
- - Key used to store response value in resultMap
.- Returns:
- this
JsonResponseUtil
.
-
withResponseType
public JsonResponseUtil withResponseType(java.lang.Class<?> clazz)
- Parameters:
clazz
- - A type of response which will be use instead of defaultMap
.- Returns:
- this
JsonResponseUtil
.
-
withIgnoreResponseKey
public JsonResponseUtil withIgnoreResponseKey()
During response decomposition we will ignore default key and use raw response structure as resultMap
.- Returns:
- this
JsonResponseUtil
.
-
withSubtypeKey
public JsonResponseUtil withSubtypeKey(java.lang.String subTypeKey)
- Parameters:
subTypeKey
- - Key which is used to put subtype to result map.- Returns:
- this
JsonResponseUtil
.
-
withSubTypeClazz
public JsonResponseUtil withSubTypeClazz(java.lang.Class<?> clazz)
- Parameters:
clazz
- - type of the subtype.- Returns:
- this
JsonResponseUtil
.
-
-