X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fcore%2FRequest.java;h=2c79856d7436118a9ba4fbe42791f04319038271;hb=fe1254de274c0e3b74df93d00051e7025d725579;hp=6f05e7b75f3df1ec3f49227ce145df4262080cd2;hpb=b926296901ce9c088cf3a376a3bc809306a5a556;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/core/Request.java b/src/net/pterodactylus/jsite/core/Request.java index 6f05e7b..2c79856 100644 --- a/src/net/pterodactylus/jsite/core/Request.java +++ b/src/net/pterodactylus/jsite/core/Request.java @@ -25,7 +25,6 @@ import net.pterodactylus.util.beans.AbstractBean; * A request is an ongoing download or upload reported by the freenet node. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class Request extends AbstractBean { @@ -33,7 +32,6 @@ public class Request extends AbstractBean { * The type of a request. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public enum Type { @@ -66,6 +64,9 @@ public class Request extends AbstractBean { /** Name of the “fetchable” property. */ public static final String PROPERTY_FETCHABLE = "fetchable"; + /** Name of the “URI” property. */ + public static final String PROPERTY_URI = "uri"; + /** Name of the “total blocks” property. */ public static final String PROPERTY_TOTAL_BLOCKS = "totalBlocks"; @@ -105,6 +106,9 @@ public class Request extends AbstractBean { /** Whether the data is already fetchable (in case of put requests). */ private boolean fetchable; + /** The generated URI. */ + private String uri; + /** The total number of blocks. */ private int totalBlocks; @@ -275,6 +279,25 @@ public class Request extends AbstractBean { } /** + * Returns the URI generated by this request. + * + * @return The generated URI + */ + public String getURI() { + return uri; + } + + /** + * Sets the URI generated by this request. + * + * @param uri + * The generated URI + */ + void setURI(String uri) { + this.uri = uri; + } + + /** * Returns the total number of blocks of a request. Until * {@link #isTotalFinalized()} returns true this value may * change!