* 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 {
* The type of a request.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public enum Type {
/** 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";
/** 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;
}
/**
+ * 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 <code>true</code> this value may
* change!