Class BaseAwsJsonProtocolFactory

    • Field Detail

      • AWS_JSON

        protected static final JsonContentTypeResolver AWS_JSON
        Content type resolver implementation for plain text AWS_JSON services.
    • Method Detail

      • createResponseHandler

        public final <T extends SdkPojoHttpResponseHandler<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 SdkPojoHttpResponseHandler<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.
      • getContentType

        public final String getContentType()
      • getContentTypeResolver

        protected JsonContentTypeResolver getContentTypeResolver()
        Returns:
        Content type resolver implementation to use.
      • getDefaultTimestampFormats

        protected Map<MarshallLocation,​TimestampFormatTrait.Format> getDefaultTimestampFormats()
        Returns:
        The default timestamp format for unmarshalling for each location in the response. This can be overridden by subclasses to customize behavior.