Class FlexibleChecksummer
- java.lang.Object
-
- software.amazon.awssdk.http.auth.aws.internal.signer.FlexibleChecksummer
-
- All Implemented Interfaces:
Checksummer
public final class FlexibleChecksummer extends Object implements Checksummer
A "flexible" implementation of a checksummer. It takes a map of checksums and their header names, computes them efficiently by updating each checksum while reading the payload (once), and adds the computed checksum strings to the request using the given header names in the map. This should be used in cases where a (flexible) checksum algorithm is present during signing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlexibleChecksummer.Option
-
Constructor Summary
Constructors Constructor Description FlexibleChecksummer(FlexibleChecksummer.Option... options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<org.reactivestreams.Publisher<ByteBuffer>>checksum(org.reactivestreams.Publisher<ByteBuffer> payload, SdkHttpRequest.Builder request)Given a payload, asynchronously calculate a checksum and promise to add it to the request.voidchecksum(ContentStreamProvider payload, SdkHttpRequest.Builder request)Given a payload, calculate a checksum and add it to the request.static FlexibleChecksummer.Option.Builderoption()
-
-
-
Constructor Detail
-
FlexibleChecksummer
public FlexibleChecksummer(FlexibleChecksummer.Option... options)
-
-
Method Detail
-
checksum
public void checksum(ContentStreamProvider payload, SdkHttpRequest.Builder request)
Description copied from interface:ChecksummerGiven a payload, calculate a checksum and add it to the request.- Specified by:
checksumin interfaceChecksummer
-
checksum
public CompletableFuture<org.reactivestreams.Publisher<ByteBuffer>> checksum(org.reactivestreams.Publisher<ByteBuffer> payload, SdkHttpRequest.Builder request)
Description copied from interface:ChecksummerGiven a payload, asynchronously calculate a checksum and promise to add it to the request.- Specified by:
checksumin interfaceChecksummer
-
option
public static FlexibleChecksummer.Option.Builder option()
-
-