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>
@SdkInternalApi
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
ConstructorsConstructorDescriptionJsonResponseHandler(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
Modifier and TypeMethodDescriptionhandle(SdkHttpFullResponse response, ExecutionAttributes executionAttributes) boolean
-
Constructor Details
-
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 Details
-
handle
public T handle(SdkHttpFullResponse response, ExecutionAttributes executionAttributes) throws Exception - Specified by:
handlein interfaceHttpResponseHandler<T extends SdkPojo>- Throws:
Exception- See Also:
-
needsConnectionLeftOpen
public boolean needsConnectionLeftOpen()- Specified by:
needsConnectionLeftOpenin interfaceHttpResponseHandler<T extends SdkPojo>
-