public class LegacyErrorUnmarshaller extends java.lang.Object implements Unmarshaller<AmazonServiceException,org.w3c.dom.Node>
| Modifier | Constructor and Description |
|---|---|
|
LegacyErrorUnmarshaller()
Constructs a new unmarshaller that will unmarshall AWS error responses as
a generic AmazonServiceException object.
|
protected |
LegacyErrorUnmarshaller(java.lang.Class<? extends AmazonServiceException> exceptionClass)
Constructor allowing subclasses to specify a specific type of
AmazonServiceException to instantiating when populating the exception
object with data from the AWS error response.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorPropertyPath(java.lang.String property)
Returns the path to the specified property within an error response.
|
java.lang.String |
parseErrorCode(org.w3c.dom.Node in)
Returns the AWS error code for the specified error response.
|
AmazonServiceException |
unmarshall(org.w3c.dom.Node in) |
public LegacyErrorUnmarshaller()
protected LegacyErrorUnmarshaller(java.lang.Class<? extends AmazonServiceException> exceptionClass)
exceptionClass - The class of AmazonServiceException to create and
populate when unmarshalling the AWS error response.public AmazonServiceException unmarshall(org.w3c.dom.Node in) throws java.lang.Exception
unmarshall in interface Unmarshaller<AmazonServiceException,org.w3c.dom.Node>in - to unmarshall.java.lang.Exceptionpublic java.lang.String parseErrorCode(org.w3c.dom.Node in)
throws java.lang.Exception
in - The DOM tree node containing the error response.java.lang.Exception - If any problems were encountered pulling out the AWS
error code.public java.lang.String getErrorPropertyPath(java.lang.String property)
property - The name of the desired property.