Class AbstractStreamingRequestMarshaller<T>

java.lang.Object
software.amazon.awssdk.core.internal.transform.AbstractStreamingRequestMarshaller<T>
All Implemented Interfaces:
Marshaller<T>
Direct Known Subclasses:
AsyncStreamingRequestMarshaller, StreamingRequestMarshaller

@SdkInternalApi public abstract class AbstractStreamingRequestMarshaller<T> extends Object implements Marshaller<T>
  • Field Details

    • delegateMarshaller

      protected final Marshaller<T> delegateMarshaller
    • requiresLength

      protected final boolean requiresLength
    • transferEncoding

      protected final boolean transferEncoding
    • useHttp2

      protected final boolean useHttp2
  • Constructor Details

  • Method Details

    • addHeaders

      protected final void addHeaders(SdkHttpFullRequest.Builder marshalled, Optional<Long> contentLength, boolean requiresLength, boolean transferEncoding, boolean useHttp2)
      This method will run certain validations for content-length and add additional headers (like Transfer-Encoding) if necessary. If requiresLength and transferEncoding is not set to true and Content Length is missing, SDK is not required to calculate the Content-Length and delegate that behavior to the underlying http client.
      Parameters:
      marshalled - A mutable builder for SdkHttpFullRequest representing a HTTP request.
      contentLength - Optional of content length
      requiresLength - True if Content-Length header is required on the request
      transferEncoding - True if "Transfer-Encoding: chunked" header should be set on request
      useHttp2 - True if the operation uses http2