Search in sources :

Example 6 with HttpRequest

use of org.jclouds.http.HttpRequest in project dhis2-core by dhis2.

the class JCloudsFileResourceContentStore method getSignedGetContentUri.

@Override
public URI getSignedGetContentUri(String key) {
    BlobRequestSigner signer = blobStoreContext.getSigner();
    if (!requestSigningSupported(signer)) {
        return null;
    }
    HttpRequest httpRequest;
    try {
        httpRequest = signer.signGetBlob(config.container, key, FIVE_MINUTES_IN_SECONDS);
    } catch (UnsupportedOperationException uoe) {
        return null;
    }
    return httpRequest.getEndpoint();
}
Also used : HttpRequest(org.jclouds.http.HttpRequest)

Aggregations

HttpRequest (org.jclouds.http.HttpRequest)6 File (java.io.File)2 HttpResponse (org.jclouds.http.HttpResponse)2 HttpResponseException (org.jclouds.http.HttpResponseException)2 BlobCache (org.apache.whirr.util.BlobCache)1 BlobRequestSigner (org.jclouds.blobstore.BlobRequestSigner)1 LocalBlobRequestSigner (org.jclouds.blobstore.LocalBlobRequestSigner)1 Blob (org.jclouds.blobstore.domain.Blob)1