X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2Fhighlevel%2FHighLevelProgress.java;h=675b950ae8f310978ffec96933a153406a873530;hb=c1710356b299b5d3eebd019e69e370ac6f7b81b5;hp=ec648f8e1f3e8ff635bf3749f5be4b6450760c42;hpb=eb23f17afdd9f12dd4a93388a01fb442d1efef26;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/highlevel/HighLevelProgress.java b/src/net/pterodactylus/fcp/highlevel/HighLevelProgress.java index ec648f8..675b950 100644 --- a/src/net/pterodactylus/fcp/highlevel/HighLevelProgress.java +++ b/src/net/pterodactylus/fcp/highlevel/HighLevelProgress.java @@ -25,7 +25,7 @@ package net.pterodactylus.fcp.highlevel; * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @version $Id$ */ -public abstract class HighLevelProgress extends HighLevelResult { +public class HighLevelProgress extends HighLevelResult { /** The number of total blocks. */ private int totalBlocks; @@ -56,6 +56,35 @@ public abstract class HighLevelProgress extends HighLevelResult { } /** + * Creates a new high-level progress with the given values. + * + * @param identifier + * The identifier of the request + * @param totalBlocks + * The total number of blocks + * @param requiredBlocks + * The number of required blocks + * @param successfulBlocks + * The number of successful blocks + * @param failedBlocks + * The number of failed blocks + * @param fatallyFailedBlocks + * The number of fatally failed blocks + * @param totalFinalized + * true if the total number of blocks is + * finalized, false otherwise + */ + public HighLevelProgress(String identifier, int totalBlocks, int requiredBlocks, int successfulBlocks, int failedBlocks, int fatallyFailedBlocks, boolean totalFinalized) { + this(identifier); + this.totalBlocks = totalBlocks; + this.requiredBlocks = requiredBlocks; + this.successfulBlocks = successfulBlocks; + this.failedBlocks = failedBlocks; + this.fatallyFailedBlocks = fatallyFailedBlocks; + this.totalFinalized = totalFinalized; + } + + /** * Returns the number of total blocks. * * @return The number of total blocks