Class BaseAwsJsonProtocolFactory

java.lang.Object
software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory
Direct Known Subclasses:
AwsCborProtocolFactory, AwsJsonProtocolFactory

public abstract class BaseAwsJsonProtocolFactory extends Object
  • Method Details

    • createResponseHandler

      public final <T extends SdkPojo> HttpResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, Supplier<SdkPojo> pojoSupplier)
      Creates a new response handler with the given JsonOperationMetadata and a supplier of the POJO response type.
      Type Parameters:
      T - Type being unmarshalled.
      Parameters:
      operationMetadata - Metadata about operation being unmarshalled.
      pojoSupplier - Supplier of the POJO response type.
      Returns:
      HttpResponseHandler that will handle the HTTP response and unmarshall into a POJO.
    • createResponseHandler

      public final <T extends SdkPojo> HttpResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, Function<SdkHttpFullResponse,SdkPojo> pojoSupplier)
      Creates a new response handler with the given JsonOperationMetadata and a supplier of the POJO response type.
      Type Parameters:
      T - Type being unmarshalled.
      Parameters:
      operationMetadata - Metadata about operation being unmarshalled.
      pojoSupplier - Supplier of the POJO response type. Has access to the HTTP response, primarily for polymorphic deserialization as seen in event stream (i.e. unmarshalled event depends on ':event-type' header).
      Returns:
      HttpResponseHandler that will handle the HTTP response and unmarshall into a POJO.
    • createErrorResponseHandler

      public final HttpResponseHandler<AwsServiceException> createErrorResponseHandler(JsonOperationMetadata errorResponseMetadata)
      Creates a response handler for handling a error response (non 2xx response).
    • getContentType

      public final String getContentType()
    • createProtocolMarshaller

      public final ProtocolMarshaller<SdkHttpFullRequest> createProtocolMarshaller(OperationInfo operationInfo)