當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。