onResponse
public <T extends BoxObject> T onResponse(java.lang.Class<T> clazz,
BoxHttpResponse response)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
BoxException
Parse the response from the server into the expected object T. clazz is used to create a new instance of this object in this implementation,
so if using this implementation, it is important that T be an instance of BoxJsonObject.
- Overrides:
onResponse in class BoxRequest.BoxRequestHandler<BoxRequestsFile.CommitUploadSession>
- Type Parameters:
T - the class to return an instance of.
- Parameters:
clazz - the class to use to construct an instance of T in which to parse data to.
response - the response from the server.
- Returns:
- an instance of T parsed from the server response.
- Throws:
java.lang.IllegalAccessException - thrown if clazz this class does not have access to the constructor for clazz.
java.lang.InstantiationException - thrown if clazz cannot be instantiated for example if it does not have a default contsructor.
BoxException - thrown for any type of server exception or server response indicating an error.