001package org.jsoup;
002
003@FunctionalInterface
004
005public interface Progress<ProgressContext> {
006    /**
007     Called to report progress. Note that this will be executed by the same thread that is doing the work, so either
008     don't take to long, or hand it off to another thread.
009     @param processed the number of bytes processed so far.
010     @param total the total number of expected bytes, or -1 if unknown.
011     @param percent the percentage of completion, 0.0..100.0. If the expected total is unknown, % will remain at zero
012     until complete.
013     @param context the object that progress was made on.
014     @since 1.18.1
015     */
016    void onProgress(int processed, int total, float percent, ProgressContext context);
017}