jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Kingsland <steve.kingsl...@opower.com>
Subject Re: Example of setting Blob ACL using S3 provider?
Date Fri, 26 Sep 2014 16:12:29 GMT
Ah, you mean this:
http://jclouds.apache.org/reference/javadoc/1.7.x/org/jclouds/View.html#unwrapApi(java.lang.Class)

Looks like it was just added in Jclouds 1.7, which explains why I'm not
seeing it locally. :(



*Steve Kingsland*

Senior Software Engineer

*Opower* <http://www.opower.com/>


*We’re hiring! See jobs here <http://www.opower.com/careers>*

On Fri, Sep 26, 2014 at 11:59 AM, Ignasi Barrera <nacx@apache.org> wrote:

> You should be able to create the portable BlobStoreContext and use the
> "unwrapApi" method to get the provider specific api you want to use
> (S3Client or AWSS3Client).
> El 26/09/2014 17:38, "Steve Kingsland" <steve.kingsland@opower.com>
> escribió:
>
> Thanks, now I understand the difference between APIs and providers better.
>> I had previously thought that I needed to create an S3Client instance via
>> contextBuilder.buildApi(S3Client.class). But it looks like I can get a
>> reference to it from the basic BlobStoreContext instead:
>>
>> BlobStoreContext context =
>> ContextBuilder.newBuilder("s3")....buildView(BlobStoreContext.class);
>>
>> S3Client s3Client = context.<RestContext<S3Client,
>> S3AsyncClient>>unwrap().getApi();
>>
>> The only problem is that RestContext is deprecated (in Jclouds 1.6.3),
>> and I'm not sure how to get the the S3Client object using ApiContext
>>  instead.
>>
>>
>>
>> *Steve Kingsland*
>>
>> Senior Software Engineer
>>
>> *Opower* <http://www.opower.com/>
>>
>>
>> *We’re hiring! See jobs here <http://www.opower.com/careers>*
>>
>> On Fri, Sep 26, 2014 at 2:17 AM, Andrew Phillips <andrewp@apache.org>
>> wrote:
>>
>>> although I'm not entirely sure what the difference is between the
>>>> AWSS3Client
>>>> the docs are using, and the S3Client that I've used
>>>>
>>>
>>> One is the API-specific client, the other the provider-specific client
>>> (see [1]). I.e. S3Client should work with all "S3-compatible" providers,
>>> whereas the AWSS3Client could expose extra functionality that *only* Amazon
>>> offers.
>>>
>>> Hope that helps!
>>>
>>> ap
>>>
>>> PS: PRs to update outdated docs much appreciated...thanks!
>>>
>>> [1] http://jclouds.apache.org/start/concepts/
>>>
>>
>>

Mime
View raw message