com.netease.cloud.transform
public abstract class AbstractErrorUnmarshaller<T> extends Object implements Unmarshaller<ServiceException,T>
Modifier and Type | Field and Description |
---|---|
protected Class<? extends ServiceException> |
exceptionClass
The type of ServiceException that will be instantiated.
|
Constructor and Description |
---|
AbstractErrorUnmarshaller()
Constructs a new error unmarshaller that will unmarshall error responses
into ServiceException objects.
|
AbstractErrorUnmarshaller(Class<? extends ServiceException> exceptionClass)
Constructs a new error unmarshaller that will unmarshall error responses
into objects of the specified class, extending ServiceException.
|
Modifier and Type | Method and Description |
---|---|
protected ServiceException |
newException(String message)
Constructs a new exception object of the type specified in this class's
constructor and sets the specified error message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unmarshall
protected final Class<? extends ServiceException> exceptionClass
public AbstractErrorUnmarshaller()
public AbstractErrorUnmarshaller(Class<? extends ServiceException> exceptionClass)
exceptionClass
- The subclass of ServiceException which will be instantiated
and populated by this class.protected ServiceException newException(String message) throws Exception
message
- The error message to set in the new exception object.Exception
- If there are any problems using reflection to invoke the
exception class's constructor.Copyright © 2017. All Rights Reserved.