当前位置: 首页>>代码示例>>Java>>正文


Java ProgressListener类代码示例

本文整理汇总了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;
}
 
开发者ID:google,项目名称:gdata-java-client,代码行数:23,代码来源:ResumableGDataFileUploader.java

示例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;
}
 
开发者ID:google,项目名称:gdata-java-client,代码行数:15,代码来源:ResumableGDataFileUploader.java


注:本文中的com.google.gdata.client.uploader.ProgressListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。