Package org.jclouds.s3.filters
Class Aws4SignerForChunkedUpload
- java.lang.Object
-
- org.jclouds.s3.filters.Aws4SignerBase
-
- org.jclouds.s3.filters.Aws4SignerForChunkedUpload
-
public class Aws4SignerForChunkedUpload extends Aws4SignerBase
AWS4 signer sign 'chunked' uploads.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jclouds.s3.filters.Aws4SignerBase
Aws4SignerBase.ServiceAndRegion
-
-
Field Summary
-
Fields inherited from class org.jclouds.s3.filters.Aws4SignerBase
creds, crypto, dateFormat, headerTag, serviceAndRegion, signatureWire, timestampFormat, timestampProvider
-
-
Constructor Summary
Constructors Constructor Description Aws4SignerForChunkedUpload(SignatureWire signatureWire, String headerTag, int userDataBlockSize, com.google.common.base.Supplier<Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, Crypto crypto)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static long
calculateChunkedContentLength(long originalLength, long chunkSize)
Calculates the expanded payload size of our data when it is chunkedprotected String
getPayloadHash()
protected HttpRequest
sign(HttpRequest request)
-
Methods inherited from class org.jclouds.s3.filters.Aws4SignerBase
appendAmzHeaders, createStringToSign, getCanonicalizedQueryString, getContentLength, getContentType, hash, hash, hash, hex, hmacSHA256, hmacSHA256, hostHeaderFor, lowerCaseNaturalOrderKeys, signatureKey, urlEncode
-
-
-
-
Constructor Detail
-
Aws4SignerForChunkedUpload
@Inject public Aws4SignerForChunkedUpload(SignatureWire signatureWire, @Named("jclouds.aws.header.tag") String headerTag, @Named("jclouds.s3.chunked.size") int userDataBlockSize, com.google.common.base.Supplier<Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, Crypto crypto)
-
-
Method Detail
-
sign
protected HttpRequest sign(HttpRequest request) throws HttpException
- Throws:
HttpException
-
getPayloadHash
protected String getPayloadHash()
-
calculateChunkedContentLength
public static long calculateChunkedContentLength(long originalLength, long chunkSize)
Calculates the expanded payload size of our data when it is chunked- Parameters:
originalLength
- The true size of the data payload to be uploadedchunkSize
- The size of each chunk we intend to send; each chunk will be prefixed with signed header data, expanding the overall size by a determinable amount- Returns:
- The overall payload size to use as content-length on a chunked upload
-
-