> +         e.printStackTrace();
> +      }
> +      finally {         
> +         uploadDirToCDN.close();
> +      }
> +   }
> +   
> +   public UploadDirectoryToCDN(String username, String apiKey) {
> +      Iterable<Module> modules = ImmutableSet.<Module> of(new 
> SLF4JLoggingModule());
> +      
> +      BlobStoreContext context = ContextBuilder.newBuilder(PROVIDER)
> +            .credentials(username, apiKey)
> +            .modules(modules)
> +            .buildView(BlobStoreContext.class);
> +      storage = context.getBlobStore();
> +      rackspace = 
> context.unwrap(CloudFilesApiMetadata.CONTEXT_TOKEN).getApi();

It would. But these examples need to work with officially released versions of 
jclouds, not snapshots. unwrapApi isn't in 1.6.x so I can't use it here. :(

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/11/files#r5439235

Reply via email to