@Singleton public class SwiftBlobSigner<T extends CommonSwiftClient> extends Object implements BlobRequestSigner
| Modifier | Constructor and Description |
|---|---|
protected |
SwiftBlobSigner(BlobToObject blobToObject,
BlobToHttpGetOptions blob2HttpGetOptions,
Crypto crypto,
com.google.inject.Provider<Long> unixEpochTimestampProvider,
com.google.common.base.Supplier<String> temporaryUrlKeySupplier,
com.google.common.base.Function<Invocation,HttpRequest> processor,
Class<T> ownerType)
create a signer for this subtype of swift
|
| Modifier and Type | Method and 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,
GetOptions options) |
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 time
|
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
|
HttpRequest |
signRemoveBlob(String container,
String name)
gets a signed request, including headers as necessary, to delete a blob from an external
client.
|
@Inject protected SwiftBlobSigner(BlobToObject blobToObject, BlobToHttpGetOptions blob2HttpGetOptions, Crypto crypto, com.google.inject.Provider<Long> unixEpochTimestampProvider, com.google.common.base.Supplier<String> temporaryUrlKeySupplier, com.google.common.base.Function<Invocation,HttpRequest> processor, Class<T> ownerType) throws SecurityException, NoSuchMethodException
processor - bound to the current subclass of CommonSwiftClientSecurityExceptionNoSuchMethodExceptionpublic HttpRequest signGetBlob(String container, String name)
BlobRequestSignersignGetBlob in interface BlobRequestSignercontainer - container where the blob residespublic HttpRequest signGetBlob(String container, String name, long timeInSeconds)
BlobRequestSignersignGetBlob in interface BlobRequestSignertimeInSeconds - validity time in seconds for the generated requestBlobRequestSigner.signGetBlob(String, String)public HttpRequest signGetBlob(String container, String name, GetOptions options)
signGetBlob in interface BlobRequestSignerBlobRequestSigner.signGetBlob(String, String)public HttpRequest signPutBlob(String container, Blob blob)
BlobRequestSigner
Blob blob = context.getBlobStore.blobBuilder().name("name").forSigning().contentType("text/plain")
.contentLength(length).build();
signPutBlob in interface BlobRequestSignercontainer - container where the blob residesblob - what to uploadBlobBuilder#forSigningpublic HttpRequest signPutBlob(String container, Blob blob, long timeInSeconds)
BlobRequestSignersignPutBlob in interface BlobRequestSignertimeInSeconds - validity time in seconds for the generated requestBlobBuilder#forSigning,
BlobRequestSigner.signPutBlob(java.lang.String, org.jclouds.blobstore.domain.Blob)public HttpRequest signRemoveBlob(String container, String name)
BlobRequestSignersignRemoveBlob in interface BlobRequestSignercontainer - container where the blob residesCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.