Class JsonResponseUtil
java.lang.Object
org.ovirt.vdsm.jsonrpc.client.utils.JsonResponseUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidpopulate(JsonRpcResponse response) private voidupdateResponse(Object object) During response decomposition we will ignore default key and use raw response structure as resultMap.withResponseKey(String responseKey) withResponseType(Class<?> clazz) withSubTypeClazz(Class<?> clazz) withSubtypeKey(String subTypeKey)
-
Field Details
-
STATUS
- See Also:
-
DEFAULT_KEY
- See Also:
-
STATUS_DONE
-
TIMEOUT_STATUS
-
responseMap
-
responseKey
-
subtypeKey
-
clazz
-
subTypeClazz
-
ignoreResponseKey
private boolean ignoreResponseKey
-
-
Constructor Details
-
JsonResponseUtil
public JsonResponseUtil()
-
-
Method Details
-
populate
-
updateResponse
-
checkAndUpdateStatus
private void checkAndUpdateStatus() -
withResponseKey
- Parameters:
responseKey- - Key used to store response value in resultMap.- Returns:
- this
JsonResponseUtil.
-
withResponseType
- Parameters:
clazz- - A type of response which will be use instead of defaultMap.- Returns:
- this
JsonResponseUtil.
-
withIgnoreResponseKey
During response decomposition we will ignore default key and use raw response structure as resultMap.- Returns:
- this
JsonResponseUtil.
-
withSubtypeKey
- Parameters:
subTypeKey- - Key which is used to put subtype to result map.- Returns:
- this
JsonResponseUtil.
-
withSubTypeClazz
- Parameters:
clazz- - type of the subtype.- Returns:
- this
JsonResponseUtil.
-