本文整理匯總了Java中com.google.gdata.client.uploader.ProgressListener類的典型用法代碼示例。如果您正苦於以下問題:Java ProgressListener類的具體用法?Java ProgressListener怎麽用?Java ProgressListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ProgressListener類屬於com.google.gdata.client.uploader包,在下文中一共展示了ProgressListener類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ResumableGDataFileUploader
import com.google.gdata.client.uploader.ProgressListener; //導入依賴的package包/類
/**
* Constructor to update a media with progress update. Use {@link Builder}
* to construct this instance.
*
* @param uploadUrl resumable media upload url.
* @param file media file to upload.
* @param service {@link MediaService} for target service.
* @param chunkSize max chunk size in bytes to include in each request.
* @param executor resource pool to execute upload task.
* @param progressListener callback to listen to progress updates.
* @param progressIntervalMillis how often to notify about update progress.
* @throws IOException any read/write error
* @throws ServiceException any service specific error
*/
private ResumableGDataFileUploader(URL uploadUrl, MediaFileSource file,
MediaService service, long chunkSize, ExecutorService executor,
ProgressListener progressListener, long progressIntervalMillis)
throws IOException, ServiceException {
super(uploadUrl, file.getMediaFile(), executor, progressListener, chunkSize,
progressIntervalMillis);
this.service = service;
}
示例2: trackProgress
import com.google.gdata.client.uploader.ProgressListener; //導入依賴的package包/類
/**
* Sets parameters to track upload progress.
*
* @param listener {@link ProgressListener} callback for tracking progress.
* @param progressInterval time interval in millis for progress
* notifications.
* @return builder.
*/
public Builder trackProgress(
ProgressListener listener, long progressInterval) {
this.listener = listener;
this.progressInterval = progressInterval;
return this;
}