Package org.jclouds.atmos.blobstore
Class AtmosBlobRequestSigner
- java.lang.Object
-
- org.jclouds.atmos.blobstore.AtmosBlobRequestSigner
-
- All Implemented Interfaces:
BlobRequestSigner
@Singleton public class AtmosBlobRequestSigner extends Object implements BlobRequestSigner
-
-
Constructor Summary
Constructors Constructor Description AtmosBlobRequestSigner(com.google.common.base.Function<Invocation,HttpRequest> processor, BlobToObject blobToObject, BlobToHttpGetOptions blob2ObjectGetOptions, SignRequest signer, com.google.common.base.Supplier<URI> endpointProvider, com.google.common.base.Supplier<Credentials> creds, DateService dateService, com.google.inject.Provider<String> timeStampProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequest
signGetBlob(String container, String name)
gets a signed request, including headers as necessary, to access a blob from an external client.HttpRequest
signGetBlob(String container, String name, long timeInSeconds)
gets a signed request, including headers as necessary, to allow access to a blob from an external client for a limited period of timeHttpRequest
signGetBlob(String container, String name, GetOptions options)
HttpRequest
signPutBlob(String container, Blob blob)
gets a signed request, including headers as necessary, to upload a blob from an external client.HttpRequest
signPutBlob(String container, Blob blob, long timeInSeconds)
gets a signed request, including headers as necessary, to upload a blob from an external client for a limited period of time
-
-
-
Constructor Detail
-
AtmosBlobRequestSigner
@Inject public AtmosBlobRequestSigner(com.google.common.base.Function<Invocation,HttpRequest> processor, BlobToObject blobToObject, BlobToHttpGetOptions blob2ObjectGetOptions, SignRequest signer, com.google.common.base.Supplier<URI> endpointProvider, com.google.common.base.Supplier<Credentials> creds, DateService dateService, com.google.inject.Provider<String> timeStampProvider) throws SecurityException, NoSuchMethodException
-
-
Method Detail
-
signGetBlob
public HttpRequest signGetBlob(String container, String name)
Description copied from interface:BlobRequestSigner
gets a signed request, including headers as necessary, to access a blob from an external client.- Specified by:
signGetBlob
in interfaceBlobRequestSigner
- Parameters:
container
- container where the blob resides
-
signGetBlob
public HttpRequest signGetBlob(String container, String name, long timeInSeconds)
Description copied from interface:BlobRequestSigner
gets a signed request, including headers as necessary, to allow access to a blob from an external client for a limited period of time- Specified by:
signGetBlob
in interfaceBlobRequestSigner
timeInSeconds
- validity time in seconds for the generated request- See Also:
BlobRequestSigner.signGetBlob(String, String)
-
signPutBlob
public HttpRequest signPutBlob(String container, Blob blob)
Description copied from interface:BlobRequestSigner
gets a signed request, including headers as necessary, to upload a blob from an external client.Blob blob = context.getBlobStore.blobBuilder().name("name").forSigning().contentType("text/plain") .contentLength(length).build();
- Specified by:
signPutBlob
in interfaceBlobRequestSigner
- Parameters:
container
- container where the blob residesblob
- what to upload- See Also:
BlobBuilder#forSigning
-
signPutBlob
public HttpRequest signPutBlob(String container, Blob blob, long timeInSeconds)
Description copied from interface:BlobRequestSigner
gets a signed request, including headers as necessary, to upload a blob from an external client for a limited period of time- Specified by:
signPutBlob
in interfaceBlobRequestSigner
timeInSeconds
- validity time in seconds for the generated request- See Also:
BlobBuilder#forSigning
,BlobRequestSigner.signPutBlob(java.lang.String, org.jclouds.blobstore.domain.Blob)
-
signGetBlob
public HttpRequest signGetBlob(String container, String name, GetOptions options)
- Specified by:
signGetBlob
in interfaceBlobRequestSigner
- See Also:
BlobRequestSigner.signGetBlob(String, String)
-
-