Class JsonResponseHandler<T extends SdkPojo>
- java.lang.Object
-
- software.amazon.awssdk.protocols.json.internal.unmarshall.JsonResponseHandler<T>
-
- Type Parameters:
T
- Indicates the type being unmarshalled by this response handler.
- All Implemented Interfaces:
HttpResponseHandler<T>
public final class JsonResponseHandler<T extends SdkPojo> extends Object implements HttpResponseHandler<T>
Default implementation of HttpResponseHandler that handles a successful response from a service and unmarshalls the result using a JSON unmarshaller.
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.core.http.HttpResponseHandler
X_AMZ_ID_2_HEADER, X_AMZN_REQUEST_ID_HEADER, X_AMZN_REQUEST_ID_HEADER_ALTERNATE, X_AMZN_REQUEST_ID_HEADERS
-
-
Constructor Summary
Constructors Constructor Description JsonResponseHandler(JsonProtocolUnmarshaller unmarshaller, Function<SdkHttpFullResponse,SdkPojo> pojoSupplier, boolean needsConnectionLeftOpen, boolean isPayloadJson)
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
handle(SdkHttpFullResponse response, ExecutionAttributes executionAttributes)
boolean
needsConnectionLeftOpen()
-
-
-
Constructor Detail
-
JsonResponseHandler
public JsonResponseHandler(JsonProtocolUnmarshaller unmarshaller, Function<SdkHttpFullResponse,SdkPojo> pojoSupplier, boolean needsConnectionLeftOpen, boolean isPayloadJson)
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.- Parameters:
unmarshaller
- The JSON unmarshaller to use on the response.
-
-
Method Detail
-
handle
public T handle(SdkHttpFullResponse response, ExecutionAttributes executionAttributes) throws Exception
- Specified by:
handle
in interfaceHttpResponseHandler<T extends SdkPojo>
- Throws:
Exception
- See Also:
HttpResponseHandler.handle(SdkHttpFullResponse, ExecutionAttributes)
-
needsConnectionLeftOpen
public boolean needsConnectionLeftOpen()
- Specified by:
needsConnectionLeftOpen
in interfaceHttpResponseHandler<T extends SdkPojo>
-
-