Unmarshaller<AmazonServiceException,com.fasterxml.jackson.databind.JsonNode>
@ThreadSafe public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<com.fasterxml.jackson.databind.JsonNode>
Modifier and Type | Field | Description |
---|---|---|
static JsonErrorUnmarshaller |
DEFAULT_UNMARSHALLER |
Constructor | Description |
---|---|
JsonErrorUnmarshaller(Class<? extends AmazonServiceException> exceptionClass,
String handledErrorCode) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
matchErrorCode(String actualErrorCode) |
|
AmazonServiceException |
unmarshall(com.fasterxml.jackson.databind.JsonNode jsonContent) |
public static final JsonErrorUnmarshaller DEFAULT_UNMARSHALLER
public JsonErrorUnmarshaller(Class<? extends AmazonServiceException> exceptionClass, String handledErrorCode)
exceptionClass
- Exception class this unmarshaller will attempt to deserialize error response intohandledErrorCode
- AWS error code that this unmarshaller handles. Pass null to handle all exceptionspublic AmazonServiceException unmarshall(com.fasterxml.jackson.databind.JsonNode jsonContent) throws Exception
Exception
public boolean matchErrorCode(String actualErrorCode)
actualErrorCode
- Actual AWS error code found in the error response.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.