本文整理汇总了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;
}