Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.BlobStoreContext.unwrap()


      BlobStoreContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .buildView(BlobStoreContext.class);
      storage = context.getBlobStore();
      swift = context.unwrap();
   }

   /**
    * This will delete all containers that start with {@link CONTAINER} and the objects within those containers.
    */
 
View Full Code Here


      BlobStoreContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .buildView(BlobStoreContext.class);
      storage = context.getBlobStore();
      swift = context.unwrap();
   }

   private void listObjects() {
      System.out.println("List Objects");
View Full Code Here

      BlobStoreContext context = ContextBuilder.newBuilder(provider)
            .credentials(username, apiKey)
            .buildView(BlobStoreContext.class);
      storage = context.getBlobStore();
      swift = context.unwrap();
   }

   /**
    * Upload an object from a File using the Swift API.
    */
 
View Full Code Here

            .contentLength(payload.size())
            .build();
         blobStore.putBlob(containerName, blob);

         // Use Provider API
         ApiMetadata apiMetadata = context.unwrap().getProviderMetadata().getApiMetadata();
         Object object = null;
         if (apiMetadata instanceof S3ApiMetadata) {
            S3Client api = context.unwrapApi(S3Client.class);
            object = api.headObject(containerName, blobName);
         } else if (apiMetadata instanceof SwiftApiMetadata) {
View Full Code Here

            object = api.headObject(containerName, blobName);
         } else if (apiMetadata instanceof SwiftApiMetadata) {
            SwiftClient api = context.unwrapApi(SwiftClient.class);
            object = api.getObjectInfo(containerName, blobName);
         } else if (apiMetadata instanceof AzureBlobApiMetadata) {
            RestContext<AzureBlobClient, ?> providerContext = context.unwrap();
            object = providerContext.getApi().getBlobProperties(containerName, blobName);
         } else if (apiMetadata instanceof AtmosApiMetadata) {
            AtmosClient api = context.unwrapApi(AtmosClient.class);
            object = api.headFile(containerName + "/" + blobName);
         }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.