public static class ResumableHttpFileUploader.Builder extends Object
ResumableHttpFileUploader instances.| Constructor and Description |
|---|
ResumableHttpFileUploader.Builder() |
| Modifier and Type | Method and Description |
|---|---|
ResumableHttpFileUploader |
build()
Constructs a ResumableHttpFileUploader instance from this builder.
|
ResumableHttpFileUploader.Builder |
setBackoffPolicy(BackoffPolicy backoffPolicy) |
ResumableHttpFileUploader.Builder |
setChunkSize(long chunkSize) |
ResumableHttpFileUploader.Builder |
setData(UploadData data) |
ResumableHttpFileUploader.Builder |
setExecutorService(ExecutorService executor) |
ResumableHttpFileUploader.Builder |
setFile(File file) |
ResumableHttpFileUploader.Builder |
setProgressIntervalMillis(long progressIntervalMillis) |
ResumableHttpFileUploader.Builder |
setProgressListener(ProgressListener progressListener) |
ResumableHttpFileUploader.Builder |
setRequestMethod(ResumableHttpFileUploader.RequestMethod requestMethod) |
ResumableHttpFileUploader.Builder |
setUrl(URL url) |
ResumableHttpFileUploader.Builder |
setUrlConnectionFactory(com.google.gdata.client.uploader.UrlConnectionFactory urlConnectionFactory) |
public ResumableHttpFileUploader.Builder setUrl(URL url)
url - which locates the destination of the upload requestpublic ResumableHttpFileUploader.Builder setFile(File file) throws IOException
file - to be uploaded.IOException - if the file could not be read.public ResumableHttpFileUploader.Builder setData(UploadData data)
data - to be uploaded.public ResumableHttpFileUploader.Builder setExecutorService(ExecutorService executor)
executor - service to execute asynchronous upload tasks withpublic ResumableHttpFileUploader.Builder setUrlConnectionFactory(com.google.gdata.client.uploader.UrlConnectionFactory urlConnectionFactory)
urlConnectionFactory - public ResumableHttpFileUploader.Builder setProgressListener(ProgressListener progressListener)
progressListener - for receiving progress notificationspublic ResumableHttpFileUploader.Builder setChunkSize(long chunkSize)
chunkSize - size of the chunks that will get uploaded by individual
HTTP requestspublic ResumableHttpFileUploader.Builder setProgressIntervalMillis(long progressIntervalMillis)
progressIntervalMillis - number of milliseconds between
progress listener notificationspublic ResumableHttpFileUploader.Builder setRequestMethod(ResumableHttpFileUploader.RequestMethod requestMethod)
requestMethod - the http request type for upload. Use either
PUT request or POST request with x-http-method-override header set
to PUT.public ResumableHttpFileUploader.Builder setBackoffPolicy(BackoffPolicy backoffPolicy)
backoffPolicy - to determine how long to wait until retrying HTTP
requestspublic ResumableHttpFileUploader build() throws IOException
IOExceptionCopyright © 2012. All Rights Reserved.