Package org.jclouds.s3.filters
Class Aws4SignerForChunkedUpload
java.lang.Object
org.jclouds.s3.filters.Aws4SignerBase
org.jclouds.s3.filters.Aws4SignerForChunkedUpload
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
ConstructorsConstructorDescriptionAws4SignerForChunkedUpload(org.jclouds.http.internal.SignatureWire signatureWire, String headerTag, int userDataBlockSize, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, org.jclouds.crypto.Crypto crypto) -
Method Summary
Modifier and TypeMethodDescriptionstatic longcalculateChunkedContentLength(long originalLength, long chunkSize) Calculates the expanded payload size of our data when it is chunkedprotected Stringprotected org.jclouds.http.HttpRequestsign(org.jclouds.http.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 Details
-
Aws4SignerForChunkedUpload
@Inject public Aws4SignerForChunkedUpload(org.jclouds.http.internal.SignatureWire signatureWire, @Named("jclouds.aws.header.tag") String headerTag, @Named("jclouds.s3.chunked.size") int userDataBlockSize, com.google.common.base.Supplier<org.jclouds.domain.Credentials> creds, com.google.common.base.Supplier<Date> timestampProvider, Aws4SignerBase.ServiceAndRegion serviceAndRegion, org.jclouds.crypto.Crypto crypto)
-
-
Method Details
-
sign
protected org.jclouds.http.HttpRequest sign(org.jclouds.http.HttpRequest request) throws org.jclouds.http.HttpException - Throws:
org.jclouds.http.HttpException
-
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
-