Class VaultResponses
java.lang.Object
org.springframework.vault.client.VaultResponses
Utility methods to unwrap Vault responses and build
VaultException.- Author:
- Mark Paluch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VaultExceptionbuildException(HttpStatusCode statusCode, String path, String message) static VaultExceptionBuild aVaultExceptiongivenHttpStatusCodeException.static VaultExceptionstatic StringObtain the error message from a JSON response.static <T> ParameterizedTypeReference<VaultResponseSupport<T>> getTypeReference(Class<T> responseType) Create aParameterizedTypeReferenceforresponseType.static <T> TUnwrap a wrapped response created by Vault Response Wrapping
-
Constructor Details
-
VaultResponses
public VaultResponses()
-
-
Method Details
-
buildException
Build aVaultExceptiongivenHttpStatusCodeException.- Parameters:
e- must not be null.- Returns:
- the
VaultException.
-
buildException
- Parameters:
e- must not be null.path- must not be null.- Returns:
- the
VaultException.
-
buildException
-
getTypeReference
public static <T> ParameterizedTypeReference<VaultResponseSupport<T>> getTypeReference(Class<T> responseType) Create aParameterizedTypeReferenceforresponseType.- Parameters:
responseType- must not be null.- Returns:
- the
ParameterizedTypeReferenceforresponseType.
-
getError
-
unwrap
-