public abstract class VaultResponses extends Object
VaultException
.Constructor and Description |
---|
VaultResponses() |
Modifier and Type | Method and Description |
---|---|
static VaultException |
buildException(org.springframework.web.client.HttpStatusCodeException e)
Build a
VaultException given HttpStatusCodeException . |
static VaultException |
buildException(org.springframework.web.client.HttpStatusCodeException e,
String path)
|
static VaultException |
buildException(org.springframework.http.HttpStatus statusCode,
String path,
String message) |
static String |
getError(String json)
Obtain the error message from a JSON response.
|
static <T> org.springframework.core.ParameterizedTypeReference<VaultResponseSupport<T>> |
getTypeReference(Class<T> responseType)
Create a
ParameterizedTypeReference for responseType . |
static <T> T |
unwrap(String wrappedResponse,
Class<T> responseType)
Unwrap a wrapped response created by Vault Response Wrapping
|
public static VaultException buildException(org.springframework.web.client.HttpStatusCodeException e)
VaultException
given HttpStatusCodeException
.e
- must not be null.VaultException
.public static VaultException buildException(org.springframework.web.client.HttpStatusCodeException e, String path)
e
- must not be null.path
- must not be null.VaultException
.public static VaultException buildException(org.springframework.http.HttpStatus statusCode, String path, String message)
public static <T> org.springframework.core.ParameterizedTypeReference<VaultResponseSupport<T>> getTypeReference(Class<T> responseType)
ParameterizedTypeReference
for responseType
.responseType
- must not be null.ParameterizedTypeReference
for responseType
.public static String getError(String json)
json
- must not be null.Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.