BTW, with he latest changes, the way to use it is pretty much the same, but we 
allow users to directly provide the view/context or a supplier to lazily create 
it. Following the example in the PR description, the way to use it now would be 
like:

```java
BlobStoreContext blobstore = ContextBuilder.newBuilder("azureblob")
   .credentials("identity", "credential")
   ...
   .buildView(BlobStoreContext.class);

ComputeServiceContext compute = ContextBuilder.newBuilder("azurecompute-arm")
   .credentials("identity", "credential")
   .modules(ImmutableSet.of(ContextLinking.linkToView(blobstore)))
   ...
   .buildView(ComputeServiceContext.class);
```

And to get it injected (note that regardless of how the user configures the 
module we always bind a Supplier):

```java
public class DependsOnTheExternalBlob {
   private final Supplier<View> blobstore;

   @Inject DependsOnTheExternalBlob(@Named("azureblob") Supplier<View> 
blobstore) {
      blobstore = blobstore;
   }
}
```

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/960#issuecomment-221209582

Reply via email to