org.jclouds.googlecloudstorage.features
Interface ResumableUploadApi


public interface ResumableUploadApi

Provides Resumable Upload support via Rest API

See Also:
,

Method Summary
 ResumableUpload checkStatus(String bucketName, String uploadId, String contentRange)
          Check the status of a resumable upload
 ResumableUpload chunkUpload(String bucketName, String uploadId, String contentType, Long contentLength, String contentRange, org.jclouds.io.Payload payload)
          Facilitate to use resumable upload operation to upload files in chunks
 ResumableUpload initResumableUpload(String bucketName, String contentType, Long contentLength, ObjectTemplate metadata)
          initiate a Resumable Upload Session
 ResumableUpload initResumableUpload(String bucketName, String objectName, String contentType, String contentLength)
          initiate a Resumable Upload Session
 ResumableUpload upload(String bucketName, String uploadId, String contentType, String contentLength, org.jclouds.io.Payload payload)
          Stores a new object
 

Method Detail

initResumableUpload

@Named(value="Object:initResumableUpload")
ResumableUpload initResumableUpload(String bucketName,
                                          String objectName,
                                          @HeaderParam(value="X-Upload-Content-Type")
                                          String contentType,
                                          @HeaderParam(value="X-Upload-Content-Length")
                                          String contentLength)
initiate a Resumable Upload Session

Parameters:
bucketName - Name of the bucket in which the object to be stored
objectName - Name of the object to upload
contentType - Content type of the uploaded data
contentLength - ContentLength of the uploaded object (Media part)
Returns:
a ResumableUpload
See Also:
https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable

initResumableUpload

@Named(value="Object:resumableUpload")
ResumableUpload initResumableUpload(String bucketName,
                                          @HeaderParam(value="X-Upload-Content-Type")
                                          String contentType,
                                          @HeaderParam(value="X-Upload-Content-Length")
                                          Long contentLength,
                                          ObjectTemplate metadata)
initiate a Resumable Upload Session

Parameters:
bucketName - Name of the bucket in which the object to be stored
contentType - Content type of the uploaded data (Media part)
contentLength - Content length of the uploaded data (Media part)
metada - Supply an ObjectTemplate
Returns:
a ResumableUpload
See Also:
https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#simple

upload

@Named(value="Object:resumableUpload")
ResumableUpload upload(String bucketName,
                             String uploadId,
                             @HeaderParam(value="Content-Type")
                             String contentType,
                             @HeaderParam(value="Content-Length")
                             String contentLength,
                             org.jclouds.io.Payload payload)
Stores a new object

Parameters:
bucketName - Name of the bucket in which the object to be stored
options - Supply InsertObjectOptions with optional query parameters. 'name' is mandatory.
Returns:
If successful, this method returns a GCSObject resource.
See Also:
https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable

chunkUpload

@Named(value="Object:Upload")
ResumableUpload chunkUpload(String bucketName,
                                  String uploadId,
                                  @HeaderParam(value="Content-Type")
                                  String contentType,
                                  @HeaderParam(value="Content-Length")
                                  Long contentLength,
                                  @HeaderParam(value="Content-Range")
                                  String contentRange,
                                  org.jclouds.io.Payload payload)
Facilitate to use resumable upload operation to upload files in chunks

Parameters:
bucketName - Name of the bucket in which the object to be stored
uploadId - uploadId returned from initResumableUpload operation
contentType - Content type of the uploaded data
contentLength - Content length of the uploaded data
contentRange - Range in {bytes StartingByte - Endingbyte/Totalsize } format ex: bytes 0 - 1213/2000
payload - a Payload with actual data to upload
Returns:
a ResumableUpload
See Also:
https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable

checkStatus

@Named(value="Object:Upload")
ResumableUpload checkStatus(String bucketName,
                                  String uploadId,
                                  @HeaderParam(value="Content-Range")
                                  String contentRange)
Check the status of a resumable upload

Parameters:
bucketName - Name of the bucket in which the object to be stored
uploadId - uploadId returned from initResumableUpload operation
contentRange - Range in {bytes StartingByte - Endingbyte/Totalsize } format ex: bytes 0 - 1213/2000
Returns:
a ResumableUpload
See Also:
https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.