Class AbstractStreamingRequestMarshaller<T>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.transform.AbstractStreamingRequestMarshaller<T>
-
- All Implemented Interfaces:
Marshaller<T>
- Direct Known Subclasses:
AsyncStreamingRequestMarshaller
,StreamingRequestMarshaller
public abstract class AbstractStreamingRequestMarshaller<T> extends Object implements Marshaller<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractStreamingRequestMarshaller.Builder<BuilderT extends AbstractStreamingRequestMarshaller.Builder>
-
Field Summary
Fields Modifier and Type Field Description protected Marshaller<T>
delegateMarshaller
protected boolean
requiresLength
protected boolean
transferEncoding
protected boolean
useHttp2
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStreamingRequestMarshaller(AbstractStreamingRequestMarshaller.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.runtime.transform.Marshaller
marshall
-
-
-
-
Field Detail
-
delegateMarshaller
protected final Marshaller<T> delegateMarshaller
-
requiresLength
protected final boolean requiresLength
-
transferEncoding
protected final boolean transferEncoding
-
useHttp2
protected final boolean useHttp2
-
-
Constructor Detail
-
AbstractStreamingRequestMarshaller
protected AbstractStreamingRequestMarshaller(AbstractStreamingRequestMarshaller.Builder builder)
-
-
Method Detail
-
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 forSdkHttpFullRequest
representing a HTTP request.contentLength
- Optional of content lengthrequiresLength
- True if Content-Length header is required on the requesttransferEncoding
- True if "Transfer-Encoding: chunked" header should be set on requestuseHttp2
- True if the operation uses http2
-
-