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 too long, or hand it off to another thread.
009     <p>Byte counts saturate at {@link Integer#MAX_VALUE} for responses > ~ 2GB.</p>
010     @param processed the number of bytes processed so far.
011     @param total the total number of expected bytes, or -1 if unknown.
012     @param percent the percentage of completion, 0.0..100.0. If the expected total is unknown, % will remain at zero
013     until complete.
014     @param context the object that progress was made on.
015     @since 1.18.1
016     */
017    void onProgress(int processed, int total, float percent, ProgressContext context);
018}