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.
  • 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

      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 uploaded
      chunkSize - 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