T
- Indicates the type being unmarshalled by this response handler.public class JsonResponseHandler<T> extends Object implements HttpResponseHandler<AmazonWebServiceResponse<T>>
Modifier and Type | Field and Description |
---|---|
boolean |
needsConnectionLeftOpen
Boolean to indicate if connect needs to be left open.
|
Constructor and Description |
---|
JsonResponseHandler(com.amazonaws.transform.Unmarshaller<T,com.amazonaws.transform.JsonUnmarshallerContext> responseUnmarshaller)
Constructs a new response handler that will use the specified JSON
unmarshaller to unmarshall the service response and uses the specified
response element path to find the root of the business data in the
service's response.
|
Modifier and Type | Method and Description |
---|---|
AmazonWebServiceResponse<T> |
handle(HttpResponse response)
Accepts an HTTP response object, and returns an object of type T.
|
boolean |
needsConnectionLeftOpen()
Since this response handler completely consumes all the data from the
underlying HTTP connection during the handle method, we don't need to
keep the HTTP connection open.
|
protected void |
registerAdditionalMetadataExpressions(com.amazonaws.transform.JsonUnmarshallerContext unmarshallerContext)
Deprecated.
|
public boolean needsConnectionLeftOpen
public JsonResponseHandler(com.amazonaws.transform.Unmarshaller<T,com.amazonaws.transform.JsonUnmarshallerContext> responseUnmarshaller)
responseUnmarshaller
- The JSON unmarshaller to use on the response.public AmazonWebServiceResponse<T> handle(HttpResponse response) throws Exception
HttpResponseHandler
handle
in interface HttpResponseHandler<AmazonWebServiceResponse<T>>
response
- The HTTP response to handle, as received from an AWS
service.Exception
- If any problems are encountered handling the response.HttpResponseHandler.handle(com.amazonaws.http.HttpResponse)
@Deprecated protected void registerAdditionalMetadataExpressions(com.amazonaws.transform.JsonUnmarshallerContext unmarshallerContext)
unmarshallerContext
- The unmarshaller context used to process a
service's response data.public boolean needsConnectionLeftOpen()
needsConnectionLeftOpen
in interface HttpResponseHandler<AmazonWebServiceResponse<T>>
HttpResponseHandler.needsConnectionLeftOpen()
Copyright © 2018. All rights reserved.