Class LoggingMediaHttpUploaderProgressListener

  • All Implemented Interfaces:
    com.google.api.client.googleapis.media.MediaHttpUploaderProgressListener

    public class LoggingMediaHttpUploaderProgressListener
    extends Object
    implements com.google.api.client.googleapis.media.MediaHttpUploaderProgressListener
    Logs the status of uploads. At the beginning, during, and at the end of the upload, emits relevant statistics such as how many bytes uploaded and the rate at which the upload is progressing.

    A new instance of this progress listener should be used for each MediaHttpUploader.

    • Constructor Detail

      • LoggingMediaHttpUploaderProgressListener

        public LoggingMediaHttpUploaderProgressListener​(String name,
                                                        long minLoggingInterval)
        Creates a upload progress listener that emits relevant statistics about the progress of the upload.
        Parameters:
        name - The name of the resource being uploaded.
        minLoggingInterval - The minimum amount of time (millis) between logging upload progress.
    • Method Detail

      • progressChanged

        public void progressChanged​(com.google.api.client.googleapis.media.MediaHttpUploader uploader)
        Specified by:
        progressChanged in interface com.google.api.client.googleapis.media.MediaHttpUploaderProgressListener