org.jclouds.blobstore
Class LocalBlobRequestSigner

java.lang.Object
  extended by org.jclouds.blobstore.LocalBlobRequestSigner
All Implemented Interfaces:
BlobRequestSigner

@Singleton
public class LocalBlobRequestSigner
extends Object
implements BlobRequestSigner

Author:
Adrian Cole

Constructor Summary
LocalBlobRequestSigner(org.jclouds.http.filters.BasicAuthentication basicAuth, BlobToHttpGetOptions blob2HttpGetOptions, com.google.common.base.Supplier<URI> endpoint, org.jclouds.io.ContentMetadataCodec contentMetadataCodec)
           
 
Method Summary
 org.jclouds.http.HttpRequest signGetBlob(String container, String name)
          gets a signed request, including headers as necessary, to access a blob from an external client.
 org.jclouds.http.HttpRequest signGetBlob(String container, String name, GetOptions options)
           
 org.jclouds.http.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
 org.jclouds.http.HttpRequest signPutBlob(String container, Blob blob)
          gets a signed request, including headers as necessary, to upload a blob from an external client.
 org.jclouds.http.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
 org.jclouds.http.HttpRequest signRemoveBlob(String container, String name)
          gets a signed request, including headers as necessary, to delete a blob from an external client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalBlobRequestSigner

@Inject
public LocalBlobRequestSigner(org.jclouds.http.filters.BasicAuthentication basicAuth,
                                     BlobToHttpGetOptions blob2HttpGetOptions,
                                     com.google.common.base.Supplier<URI> endpoint,
                                     org.jclouds.io.ContentMetadataCodec contentMetadataCodec)
Method Detail

signGetBlob

public org.jclouds.http.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 interface BlobRequestSigner
Parameters:
container - container where the blob resides

signGetBlob

public org.jclouds.http.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 interface BlobRequestSigner
timeInSeconds - validity time in seconds for the generated request
See Also:
BlobRequestSigner.signGetBlob(String, String)

signPutBlob

public org.jclouds.http.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 interface BlobRequestSigner
Parameters:
container - container where the blob resides
blob - what to upload
See Also:
BlobBuilder#forSigning

signPutBlob

public org.jclouds.http.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 interface BlobRequestSigner
timeInSeconds - validity time in seconds for the generated request
See Also:
BlobBuilder#forSigning, BlobRequestSigner.signPutBlob(java.lang.String, org.jclouds.blobstore.domain.Blob)

signRemoveBlob

public org.jclouds.http.HttpRequest signRemoveBlob(String container,
                                                   String name)
Description copied from interface: BlobRequestSigner
gets a signed request, including headers as necessary, to delete a blob from an external client.

Specified by:
signRemoveBlob in interface BlobRequestSigner
Parameters:
container - container where the blob resides

signGetBlob

public org.jclouds.http.HttpRequest signGetBlob(String container,
                                                String name,
                                                GetOptions options)
Specified by:
signGetBlob in interface BlobRequestSigner
See Also:
BlobRequestSigner.signGetBlob(String, String)


Copyright © 2009-2013 jclouds. All Rights Reserved.