Author: toad
Date: 2007-02-16 20:00:59 +0000 (Fri, 16 Feb 2007)
New Revision: 11818

Added:
   trunk/freenet/src/freenet/client/FetchContext.java
Removed:
   trunk/freenet/src/freenet/client/FetcherContext.java
Modified:
   trunk/freenet/src/freenet/client/HighLevelSimpleClient.java
   trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
   trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java
   trunk/freenet/src/freenet/client/async/ClientGetter.java
   trunk/freenet/src/freenet/client/async/SimpleSingleFileFetcher.java
   trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
   trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
   trunk/freenet/src/freenet/client/async/USKChecker.java
   trunk/freenet/src/freenet/client/async/USKFetcher.java
   trunk/freenet/src/freenet/client/async/USKManager.java
   trunk/freenet/src/freenet/client/async/USKRetriever.java
   trunk/freenet/src/freenet/clients/http/NinjaSpider.java
   trunk/freenet/src/freenet/clients/http/Spider.java
   trunk/freenet/src/freenet/node/Node.java
   trunk/freenet/src/freenet/node/SendableGet.java
   trunk/freenet/src/freenet/node/fcp/ClientGet.java
   trunk/freenet/src/freenet/node/fcp/FCPClient.java
   trunk/freenet/src/freenet/node/fcp/FCPServer.java
   trunk/freenet/src/freenet/node/updater/NodeUpdater.java
   trunk/freenet/src/freenet/node/updater/RevocationChecker.java
Log:
FetcherContext -> FetchContext

Copied: trunk/freenet/src/freenet/client/FetchContext.java (from rev 11817, 
trunk/freenet/src/freenet/client/FetcherContext.java)
===================================================================
--- trunk/freenet/src/freenet/client/FetchContext.java                          
(rev 0)
+++ trunk/freenet/src/freenet/client/FetchContext.java  2007-02-16 20:00:59 UTC 
(rev 11818)
@@ -0,0 +1,219 @@
+/* This code is part of Freenet. It is distributed under the GNU General
+ * Public License, version 2 (or at your option any later version). See
+ * http://www.gnu.org/ for further details of the GPL. */
+package freenet.client;
+
+import freenet.client.async.HealingQueue;
+import freenet.client.async.USKManager;
+import freenet.client.events.ClientEventProducer;
+import freenet.client.events.SimpleEventProducer;
+import freenet.crypt.RandomSource;
+import freenet.support.api.BucketFactory;
+
+/** Context for a Fetcher. Contains all the settings a Fetcher needs to know 
about. */
+public class FetchContext implements Cloneable {
+
+       public static final int IDENTICAL_MASK = 0;
+       public static final int SPLITFILE_DEFAULT_BLOCK_MASK = 1;
+       public static final int SPLITFILE_DEFAULT_MASK = 2;
+       public static final int SPLITFILE_USE_LENGTHS_MASK = 3;
+       public static final int SET_RETURN_ARCHIVES = 4;
+       /** Low-level client to send low-level requests to. */
+       public long maxOutputLength;
+       public long maxTempLength;
+       public final ArchiveManager archiveManager;
+       public final BucketFactory bucketFactory;
+       public USKManager uskManager;
+       public int maxRecursionLevel;
+       public int maxArchiveRestarts;
+       public int maxArchiveLevels;
+       public boolean dontEnterImplicitArchives;
+       public int maxSplitfileThreads;
+       public int maxSplitfileBlockRetries;
+       public int maxNonSplitfileRetries;
+       public final RandomSource random;
+       public boolean allowSplitfiles;
+       public boolean followRedirects;
+       public boolean localRequestOnly;
+       public boolean ignoreStore;
+       public final ClientEventProducer eventProducer;
+       /** Whether to allow non-full blocks, or blocks which are not direct 
CHKs, in splitfiles.
+        * Set by the splitfile metadata and the mask constructor, so we don't 
need to pass it in. */
+       public boolean splitfileUseLengths;
+       public int maxMetadataSize;
+       public int maxDataBlocksPerSegment;
+       public int maxCheckBlocksPerSegment;
+       public boolean cacheLocalRequests;
+       /** If true, and we get a ZIP manifest, and we have no meta-strings 
left, then
+        * return the manifest contents as data. */
+       public boolean returnZIPManifests;
+       public final HealingQueue healingQueue;
+       public final boolean ignoreTooManyPathComponents;
+       
+       public FetchContext(long curMaxLength, 
+                       long curMaxTempLength, int maxMetadataSize, int 
maxRecursionLevel, int maxArchiveRestarts, int maxArchiveLevels,
+                       boolean dontEnterImplicitArchives, int 
maxSplitfileThreads,
+                       int maxSplitfileBlockRetries, int 
maxNonSplitfileRetries,
+                       boolean allowSplitfiles, boolean followRedirects, 
boolean localRequestOnly,
+                       int maxDataBlocksPerSegment, int 
maxCheckBlocksPerSegment,
+                       RandomSource random, ArchiveManager archiveManager, 
BucketFactory bucketFactory,
+                       ClientEventProducer producer, boolean 
cacheLocalRequests, USKManager uskManager, HealingQueue hq, boolean 
ignoreTooManyPathComponents) {
+               this.maxOutputLength = curMaxLength;
+               this.uskManager = uskManager;
+               this.maxTempLength = curMaxTempLength;
+               this.maxMetadataSize = maxMetadataSize;
+               this.archiveManager = archiveManager;
+               this.bucketFactory = bucketFactory;
+               this.maxRecursionLevel = maxRecursionLevel;
+               this.maxArchiveRestarts = maxArchiveRestarts;
+               this.maxArchiveLevels = maxArchiveLevels;
+               this.dontEnterImplicitArchives = dontEnterImplicitArchives;
+               this.random = random;
+               this.maxSplitfileThreads = maxSplitfileThreads;
+               this.maxSplitfileBlockRetries = maxSplitfileBlockRetries;
+               this.maxNonSplitfileRetries = maxNonSplitfileRetries;
+               this.allowSplitfiles = allowSplitfiles;
+               this.followRedirects = followRedirects;
+               this.localRequestOnly = localRequestOnly;
+               this.splitfileUseLengths = false;
+               this.eventProducer = producer;
+               this.maxDataBlocksPerSegment = maxDataBlocksPerSegment;
+               this.maxCheckBlocksPerSegment = maxCheckBlocksPerSegment;
+               this.cacheLocalRequests = cacheLocalRequests;
+               this.healingQueue = hq;
+               this.ignoreTooManyPathComponents = ignoreTooManyPathComponents;
+       }
+
+       public FetchContext(FetchContext ctx, int maskID, boolean keepProducer) 
{
+               this.healingQueue = ctx.healingQueue;
+               if(keepProducer)
+                       this.eventProducer = ctx.eventProducer;
+               else
+                       this.eventProducer = new SimpleEventProducer();
+               this.uskManager = ctx.uskManager;
+               this.ignoreTooManyPathComponents = 
ctx.ignoreTooManyPathComponents;
+               if(maskID == IDENTICAL_MASK) {
+                       this.maxOutputLength = ctx.maxOutputLength;
+                       this.maxMetadataSize = ctx.maxMetadataSize;
+                       this.maxTempLength = ctx.maxTempLength;
+                       this.archiveManager = ctx.archiveManager;
+                       this.bucketFactory = ctx.bucketFactory;
+                       this.maxRecursionLevel = ctx.maxRecursionLevel;
+                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
+                       this.maxArchiveLevels = ctx.maxArchiveLevels;
+                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
+                       this.random = ctx.random;
+                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
+                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
+                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
+                       this.allowSplitfiles = ctx.allowSplitfiles;
+                       this.followRedirects = ctx.followRedirects;
+                       this.localRequestOnly = ctx.localRequestOnly;
+                       this.splitfileUseLengths = ctx.splitfileUseLengths;
+                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
+                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
+                       this.cacheLocalRequests = ctx.cacheLocalRequests;
+                       this.returnZIPManifests = ctx.returnZIPManifests;
+               } else if(maskID == SPLITFILE_DEFAULT_BLOCK_MASK) {
+                       this.maxOutputLength = ctx.maxOutputLength;
+                       this.maxMetadataSize = ctx.maxMetadataSize;
+                       this.maxTempLength = ctx.maxTempLength;
+                       this.archiveManager = ctx.archiveManager;
+                       this.bucketFactory = ctx.bucketFactory;
+                       this.maxRecursionLevel = 1;
+                       this.maxArchiveRestarts = 0;
+                       this.maxArchiveLevels = ctx.maxArchiveLevels;
+                       this.dontEnterImplicitArchives = true;
+                       this.random = ctx.random;
+                       this.maxSplitfileThreads = 0;
+                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
+                       this.maxNonSplitfileRetries = 
ctx.maxSplitfileBlockRetries;
+                       this.allowSplitfiles = false;
+                       this.followRedirects = false;
+                       this.localRequestOnly = ctx.localRequestOnly;
+                       this.splitfileUseLengths = false;
+                       this.maxDataBlocksPerSegment = 0;
+                       this.maxCheckBlocksPerSegment = 0;
+                       this.cacheLocalRequests = ctx.cacheLocalRequests;
+                       this.returnZIPManifests = false;
+               } else if(maskID == SPLITFILE_DEFAULT_MASK) {
+                       this.maxOutputLength = ctx.maxOutputLength;
+                       this.maxTempLength = ctx.maxTempLength;
+                       this.maxMetadataSize = ctx.maxMetadataSize;
+                       this.archiveManager = ctx.archiveManager;
+                       this.bucketFactory = ctx.bucketFactory;
+                       this.maxRecursionLevel = ctx.maxRecursionLevel;
+                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
+                       this.maxArchiveLevels = ctx.maxArchiveLevels;
+                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
+                       this.random = ctx.random;
+                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
+                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
+                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
+                       this.allowSplitfiles = ctx.allowSplitfiles;
+                       this.followRedirects = ctx.followRedirects;
+                       this.localRequestOnly = ctx.localRequestOnly;
+                       this.splitfileUseLengths = false;
+                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
+                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
+                       this.cacheLocalRequests = ctx.cacheLocalRequests;
+                       this.returnZIPManifests = ctx.returnZIPManifests;
+               } else if(maskID == SPLITFILE_USE_LENGTHS_MASK) {
+                       this.maxOutputLength = ctx.maxOutputLength;
+                       this.maxTempLength = ctx.maxTempLength;
+                       this.maxMetadataSize = ctx.maxMetadataSize;
+                       this.archiveManager = ctx.archiveManager;
+                       this.bucketFactory = ctx.bucketFactory;
+                       this.maxRecursionLevel = ctx.maxRecursionLevel;
+                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
+                       this.maxArchiveLevels = ctx.maxArchiveLevels;
+                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
+                       this.random = ctx.random;
+                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
+                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
+                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
+                       this.allowSplitfiles = ctx.allowSplitfiles;
+                       this.followRedirects = ctx.followRedirects;
+                       this.localRequestOnly = ctx.localRequestOnly;
+                       this.splitfileUseLengths = true;
+                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
+                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
+                       this.cacheLocalRequests = ctx.cacheLocalRequests;
+                       this.returnZIPManifests = ctx.returnZIPManifests;
+               } else if (maskID == SET_RETURN_ARCHIVES) {
+                       this.maxOutputLength = ctx.maxOutputLength;
+                       this.maxMetadataSize = ctx.maxMetadataSize;
+                       this.maxTempLength = ctx.maxTempLength;
+                       this.archiveManager = ctx.archiveManager;
+                       this.bucketFactory = ctx.bucketFactory;
+                       this.maxRecursionLevel = ctx.maxRecursionLevel;
+                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
+                       this.maxArchiveLevels = ctx.maxArchiveLevels;
+                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
+                       this.random = ctx.random;
+                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
+                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
+                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
+                       this.allowSplitfiles = ctx.allowSplitfiles;
+                       this.followRedirects = ctx.followRedirects;
+                       this.localRequestOnly = ctx.localRequestOnly;
+                       this.splitfileUseLengths = ctx.splitfileUseLengths;
+                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
+                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
+                       this.cacheLocalRequests = ctx.cacheLocalRequests;
+                       this.returnZIPManifests = true;
+               }
+               else throw new IllegalArgumentException();
+       }
+
+       /** Make public, but just call parent for a field for field copy */
+       public Object clone() {
+               try {
+                       return super.clone();
+               } catch (CloneNotSupportedException e) {
+                       // Impossible
+                       throw new Error(e);
+               }
+       }
+       
+}

Deleted: trunk/freenet/src/freenet/client/FetcherContext.java
===================================================================
--- trunk/freenet/src/freenet/client/FetcherContext.java        2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/FetcherContext.java        2007-02-16 
20:00:59 UTC (rev 11818)
@@ -1,219 +0,0 @@
-/* This code is part of Freenet. It is distributed under the GNU General
- * Public License, version 2 (or at your option any later version). See
- * http://www.gnu.org/ for further details of the GPL. */
-package freenet.client;
-
-import freenet.client.async.HealingQueue;
-import freenet.client.async.USKManager;
-import freenet.client.events.ClientEventProducer;
-import freenet.client.events.SimpleEventProducer;
-import freenet.crypt.RandomSource;
-import freenet.support.api.BucketFactory;
-
-/** Context for a Fetcher. Contains all the settings a Fetcher needs to know 
about. */
-public class FetcherContext implements Cloneable {
-
-       public static final int IDENTICAL_MASK = 0;
-       public static final int SPLITFILE_DEFAULT_BLOCK_MASK = 1;
-       public static final int SPLITFILE_DEFAULT_MASK = 2;
-       public static final int SPLITFILE_USE_LENGTHS_MASK = 3;
-       public static final int SET_RETURN_ARCHIVES = 4;
-       /** Low-level client to send low-level requests to. */
-       public long maxOutputLength;
-       public long maxTempLength;
-       public final ArchiveManager archiveManager;
-       public final BucketFactory bucketFactory;
-       public USKManager uskManager;
-       public int maxRecursionLevel;
-       public int maxArchiveRestarts;
-       public int maxArchiveLevels;
-       public boolean dontEnterImplicitArchives;
-       public int maxSplitfileThreads;
-       public int maxSplitfileBlockRetries;
-       public int maxNonSplitfileRetries;
-       public final RandomSource random;
-       public boolean allowSplitfiles;
-       public boolean followRedirects;
-       public boolean localRequestOnly;
-       public boolean ignoreStore;
-       public final ClientEventProducer eventProducer;
-       /** Whether to allow non-full blocks, or blocks which are not direct 
CHKs, in splitfiles.
-        * Set by the splitfile metadata and the mask constructor, so we don't 
need to pass it in. */
-       public boolean splitfileUseLengths;
-       public int maxMetadataSize;
-       public int maxDataBlocksPerSegment;
-       public int maxCheckBlocksPerSegment;
-       public boolean cacheLocalRequests;
-       /** If true, and we get a ZIP manifest, and we have no meta-strings 
left, then
-        * return the manifest contents as data. */
-       public boolean returnZIPManifests;
-       public final HealingQueue healingQueue;
-       public final boolean ignoreTooManyPathComponents;
-       
-       public FetcherContext(long curMaxLength, 
-                       long curMaxTempLength, int maxMetadataSize, int 
maxRecursionLevel, int maxArchiveRestarts, int maxArchiveLevels,
-                       boolean dontEnterImplicitArchives, int 
maxSplitfileThreads,
-                       int maxSplitfileBlockRetries, int 
maxNonSplitfileRetries,
-                       boolean allowSplitfiles, boolean followRedirects, 
boolean localRequestOnly,
-                       int maxDataBlocksPerSegment, int 
maxCheckBlocksPerSegment,
-                       RandomSource random, ArchiveManager archiveManager, 
BucketFactory bucketFactory,
-                       ClientEventProducer producer, boolean 
cacheLocalRequests, USKManager uskManager, HealingQueue hq, boolean 
ignoreTooManyPathComponents) {
-               this.maxOutputLength = curMaxLength;
-               this.uskManager = uskManager;
-               this.maxTempLength = curMaxTempLength;
-               this.maxMetadataSize = maxMetadataSize;
-               this.archiveManager = archiveManager;
-               this.bucketFactory = bucketFactory;
-               this.maxRecursionLevel = maxRecursionLevel;
-               this.maxArchiveRestarts = maxArchiveRestarts;
-               this.maxArchiveLevels = maxArchiveLevels;
-               this.dontEnterImplicitArchives = dontEnterImplicitArchives;
-               this.random = random;
-               this.maxSplitfileThreads = maxSplitfileThreads;
-               this.maxSplitfileBlockRetries = maxSplitfileBlockRetries;
-               this.maxNonSplitfileRetries = maxNonSplitfileRetries;
-               this.allowSplitfiles = allowSplitfiles;
-               this.followRedirects = followRedirects;
-               this.localRequestOnly = localRequestOnly;
-               this.splitfileUseLengths = false;
-               this.eventProducer = producer;
-               this.maxDataBlocksPerSegment = maxDataBlocksPerSegment;
-               this.maxCheckBlocksPerSegment = maxCheckBlocksPerSegment;
-               this.cacheLocalRequests = cacheLocalRequests;
-               this.healingQueue = hq;
-               this.ignoreTooManyPathComponents = ignoreTooManyPathComponents;
-       }
-
-       public FetcherContext(FetcherContext ctx, int maskID, boolean 
keepProducer) {
-               this.healingQueue = ctx.healingQueue;
-               if(keepProducer)
-                       this.eventProducer = ctx.eventProducer;
-               else
-                       this.eventProducer = new SimpleEventProducer();
-               this.uskManager = ctx.uskManager;
-               this.ignoreTooManyPathComponents = 
ctx.ignoreTooManyPathComponents;
-               if(maskID == IDENTICAL_MASK) {
-                       this.maxOutputLength = ctx.maxOutputLength;
-                       this.maxMetadataSize = ctx.maxMetadataSize;
-                       this.maxTempLength = ctx.maxTempLength;
-                       this.archiveManager = ctx.archiveManager;
-                       this.bucketFactory = ctx.bucketFactory;
-                       this.maxRecursionLevel = ctx.maxRecursionLevel;
-                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
-                       this.maxArchiveLevels = ctx.maxArchiveLevels;
-                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
-                       this.random = ctx.random;
-                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
-                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
-                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
-                       this.allowSplitfiles = ctx.allowSplitfiles;
-                       this.followRedirects = ctx.followRedirects;
-                       this.localRequestOnly = ctx.localRequestOnly;
-                       this.splitfileUseLengths = ctx.splitfileUseLengths;
-                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
-                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
-                       this.cacheLocalRequests = ctx.cacheLocalRequests;
-                       this.returnZIPManifests = ctx.returnZIPManifests;
-               } else if(maskID == SPLITFILE_DEFAULT_BLOCK_MASK) {
-                       this.maxOutputLength = ctx.maxOutputLength;
-                       this.maxMetadataSize = ctx.maxMetadataSize;
-                       this.maxTempLength = ctx.maxTempLength;
-                       this.archiveManager = ctx.archiveManager;
-                       this.bucketFactory = ctx.bucketFactory;
-                       this.maxRecursionLevel = 1;
-                       this.maxArchiveRestarts = 0;
-                       this.maxArchiveLevels = ctx.maxArchiveLevels;
-                       this.dontEnterImplicitArchives = true;
-                       this.random = ctx.random;
-                       this.maxSplitfileThreads = 0;
-                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
-                       this.maxNonSplitfileRetries = 
ctx.maxSplitfileBlockRetries;
-                       this.allowSplitfiles = false;
-                       this.followRedirects = false;
-                       this.localRequestOnly = ctx.localRequestOnly;
-                       this.splitfileUseLengths = false;
-                       this.maxDataBlocksPerSegment = 0;
-                       this.maxCheckBlocksPerSegment = 0;
-                       this.cacheLocalRequests = ctx.cacheLocalRequests;
-                       this.returnZIPManifests = false;
-               } else if(maskID == SPLITFILE_DEFAULT_MASK) {
-                       this.maxOutputLength = ctx.maxOutputLength;
-                       this.maxTempLength = ctx.maxTempLength;
-                       this.maxMetadataSize = ctx.maxMetadataSize;
-                       this.archiveManager = ctx.archiveManager;
-                       this.bucketFactory = ctx.bucketFactory;
-                       this.maxRecursionLevel = ctx.maxRecursionLevel;
-                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
-                       this.maxArchiveLevels = ctx.maxArchiveLevels;
-                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
-                       this.random = ctx.random;
-                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
-                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
-                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
-                       this.allowSplitfiles = ctx.allowSplitfiles;
-                       this.followRedirects = ctx.followRedirects;
-                       this.localRequestOnly = ctx.localRequestOnly;
-                       this.splitfileUseLengths = false;
-                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
-                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
-                       this.cacheLocalRequests = ctx.cacheLocalRequests;
-                       this.returnZIPManifests = ctx.returnZIPManifests;
-               } else if(maskID == SPLITFILE_USE_LENGTHS_MASK) {
-                       this.maxOutputLength = ctx.maxOutputLength;
-                       this.maxTempLength = ctx.maxTempLength;
-                       this.maxMetadataSize = ctx.maxMetadataSize;
-                       this.archiveManager = ctx.archiveManager;
-                       this.bucketFactory = ctx.bucketFactory;
-                       this.maxRecursionLevel = ctx.maxRecursionLevel;
-                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
-                       this.maxArchiveLevels = ctx.maxArchiveLevels;
-                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
-                       this.random = ctx.random;
-                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
-                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
-                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
-                       this.allowSplitfiles = ctx.allowSplitfiles;
-                       this.followRedirects = ctx.followRedirects;
-                       this.localRequestOnly = ctx.localRequestOnly;
-                       this.splitfileUseLengths = true;
-                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
-                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
-                       this.cacheLocalRequests = ctx.cacheLocalRequests;
-                       this.returnZIPManifests = ctx.returnZIPManifests;
-               } else if (maskID == SET_RETURN_ARCHIVES) {
-                       this.maxOutputLength = ctx.maxOutputLength;
-                       this.maxMetadataSize = ctx.maxMetadataSize;
-                       this.maxTempLength = ctx.maxTempLength;
-                       this.archiveManager = ctx.archiveManager;
-                       this.bucketFactory = ctx.bucketFactory;
-                       this.maxRecursionLevel = ctx.maxRecursionLevel;
-                       this.maxArchiveRestarts = ctx.maxArchiveRestarts;
-                       this.maxArchiveLevels = ctx.maxArchiveLevels;
-                       this.dontEnterImplicitArchives = 
ctx.dontEnterImplicitArchives;
-                       this.random = ctx.random;
-                       this.maxSplitfileThreads = ctx.maxSplitfileThreads;
-                       this.maxSplitfileBlockRetries = 
ctx.maxSplitfileBlockRetries;
-                       this.maxNonSplitfileRetries = 
ctx.maxNonSplitfileRetries;
-                       this.allowSplitfiles = ctx.allowSplitfiles;
-                       this.followRedirects = ctx.followRedirects;
-                       this.localRequestOnly = ctx.localRequestOnly;
-                       this.splitfileUseLengths = ctx.splitfileUseLengths;
-                       this.maxDataBlocksPerSegment = 
ctx.maxDataBlocksPerSegment;
-                       this.maxCheckBlocksPerSegment = 
ctx.maxCheckBlocksPerSegment;
-                       this.cacheLocalRequests = ctx.cacheLocalRequests;
-                       this.returnZIPManifests = true;
-               }
-               else throw new IllegalArgumentException();
-       }
-
-       /** Make public, but just call parent for a field for field copy */
-       public Object clone() {
-               try {
-                       return super.clone();
-               } catch (CloneNotSupportedException e) {
-                       // Impossible
-                       throw new Error(e);
-               }
-       }
-       
-}

Modified: trunk/freenet/src/freenet/client/HighLevelSimpleClient.java
===================================================================
--- trunk/freenet/src/freenet/client/HighLevelSimpleClient.java 2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/HighLevelSimpleClient.java 2007-02-16 
20:00:59 UTC (rev 11818)
@@ -53,7 +53,7 @@
         */
        public FreenetURI insertManifest(FreenetURI insertURI, HashMap 
bucketsByName, String defaultName) throws InserterException;

-       public FetcherContext getFetcherContext();
+       public FetchContext getFetcherContext();

        /**
         * Get an InserterContext.

Modified: trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
===================================================================
--- trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java     
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java     
2007-02-16 20:00:59 UTC (rev 11818)
@@ -109,7 +109,7 @@
         */
        public FetchResult fetch(FreenetURI uri) throws FetchException {
                if(uri == null) throw new NullPointerException();
-               FetcherContext context = getFetcherContext();
+               FetchContext context = getFetcherContext();
                FetchWaiter fw = new FetchWaiter();
                ClientGetter get = new ClientGetter(fw, 
core.requestStarters.chkFetchScheduler, core.requestStarters.sskFetchScheduler, 
uri, context, priorityClass, this, null);
                get.start();
@@ -123,7 +123,7 @@
        public FetchResult fetch(FreenetURI uri, long overrideMaxSize, Object 
clientContext) throws FetchException {
                if(uri == null) throw new NullPointerException();
                FetchWaiter fw = new FetchWaiter();
-               FetcherContext context = getFetcherContext(overrideMaxSize);
+               FetchContext context = getFetcherContext(overrideMaxSize);
                ClientGetter get = new ClientGetter(fw, 
core.requestStarters.chkFetchScheduler, core.requestStarters.sskFetchScheduler, 
uri, context, priorityClass, clientContext, null);
                get.start();
                return fw.waitForCompletion();
@@ -171,11 +171,11 @@
                globalEventProducer.addEventListener(listener);
        }

-       public FetcherContext getFetcherContext() {
+       public FetchContext getFetcherContext() {
                return getFetcherContext(-1);
        }

-       public FetcherContext getFetcherContext(long overrideMaxSize) {
+       public FetchContext getFetcherContext(long overrideMaxSize) {
                long maxLength = curMaxLength;
                long maxTempLength = curMaxTempLength;
                if(overrideMaxSize >= 0) {
@@ -183,7 +183,7 @@
                        maxTempLength = overrideMaxSize;
                } 
                return                  
-                       new FetcherContext(maxLength, maxTempLength, 
curMaxMetadataLength, 
+                       new FetchContext(maxLength, maxTempLength, 
curMaxMetadataLength, 
                                MAX_RECURSION, MAX_ARCHIVE_RESTARTS, 
MAX_ARCHIVE_LEVELS, DONT_ENTER_IMPLICIT_ARCHIVES, 
                                SPLITFILE_THREADS, SPLITFILE_BLOCK_RETRIES, 
NON_SPLITFILE_RETRIES,
                                FETCH_SPLITFILES, FOLLOW_REDIRECTS, 
LOCAL_REQUESTS_ONLY,

Modified: trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java   
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java   
2007-02-16 20:00:59 UTC (rev 11818)
@@ -3,7 +3,7 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.client.async;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.keys.ClientKey;
 import freenet.node.SendableGet;
 import freenet.support.Logger;
@@ -14,9 +14,9 @@
        protected boolean cancelled;
        final int maxRetries;
        private int retryCount;
-       final FetcherContext ctx;
+       final FetchContext ctx;

-       BaseSingleFileFetcher(ClientKey key, int maxRetries, FetcherContext 
ctx, ClientRequester parent) {
+       BaseSingleFileFetcher(ClientKey key, int maxRetries, FetchContext ctx, 
ClientRequester parent) {
                super(parent);
                retryCount = 0;
                this.maxRetries = maxRetries;
@@ -28,7 +28,7 @@
                return key;
        }

-       public FetcherContext getContext() {
+       public FetchContext getContext() {
                return ctx;
        }


Modified: trunk/freenet/src/freenet/client/async/ClientGetter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientGetter.java    2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/ClientGetter.java    2007-02-16 
20:00:59 UTC (rev 11818)
@@ -10,7 +10,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.events.SplitfileProgressEvent;
 import freenet.keys.FreenetURI;
 import freenet.support.Logger;
@@ -24,7 +24,7 @@

        final ClientCallback client;
        final FreenetURI uri;
-       final FetcherContext ctx;
+       final FetchContext ctx;
        final ArchiveContext actx;
        private ClientGetState currentState;
        private boolean finished;
@@ -45,7 +45,7 @@
         * former, obviously!
         */
        public ClientGetter(ClientCallback client, ClientRequestScheduler 
chkSched, ClientRequestScheduler sskSched,
-                           FreenetURI uri, FetcherContext ctx, short 
priorityClass, Object clientContext, Bucket returnBucket) {
+                           FreenetURI uri, FetchContext ctx, short 
priorityClass, Object clientContext, Bucket returnBucket) {
                super(priorityClass, chkSched, sskSched, clientContext);
                this.client = client;
                this.returnBucket = returnBucket;

Modified: trunk/freenet/src/freenet/client/async/SimpleSingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SimpleSingleFileFetcher.java 
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/SimpleSingleFileFetcher.java 
2007-02-16 20:00:59 UTC (rev 11818)
@@ -8,7 +8,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.keys.ClientKey;
 import freenet.keys.ClientKeyBlock;
 import freenet.keys.KeyDecodeException;
@@ -22,7 +22,7 @@
  */
 public class SimpleSingleFileFetcher extends BaseSingleFileFetcher implements 
ClientGetState {

-       SimpleSingleFileFetcher(ClientKey key, int maxRetries, FetcherContext 
ctx, ClientRequester parent, GetCompletionCallback rcb, boolean isEssential, 
long l) {
+       SimpleSingleFileFetcher(ClientKey key, int maxRetries, FetchContext 
ctx, ClientRequester parent, GetCompletionCallback rcb, boolean isEssential, 
long l) {
                super(key, maxRetries, ctx, parent);
                this.rcb = rcb;
                this.token = l;

Modified: trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileFetcher.java       
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/SingleFileFetcher.java       
2007-02-16 20:00:59 UTC (rev 11818)
@@ -14,7 +14,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.Metadata;
 import freenet.client.MetadataParseException;
 import freenet.keys.BaseClientKey;
@@ -60,7 +60,7 @@
         * FIXME: Many times where this is called internally we might be better 
off using a copy constructor? 
         */
        public SingleFileFetcher(ClientRequester parent, GetCompletionCallback 
cb, ClientMetadata metadata,
-                       ClientKey key, LinkedList metaStrings, FreenetURI 
origURI, int addedMetaStrings, FetcherContext ctx,
+                       ClientKey key, LinkedList metaStrings, FreenetURI 
origURI, int addedMetaStrings, FetchContext ctx,
                        ArchiveContext actx, int maxRetries, int recursionLevel,
                        boolean dontTellClientGet, long l, boolean isEssential,
                        Bucket returnBucket, boolean isFinal) throws 
FetchException {
@@ -89,7 +89,7 @@
        /** Copy constructor, modifies a few given fields, don't call 
schedule().
         * Used for things like slave fetchers for MultiLevelMetadata, 
therefore does not remember returnBucket,
         * metaStrings etc. */
-       public SingleFileFetcher(SingleFileFetcher fetcher, Metadata newMeta, 
GetCompletionCallback callback, FetcherContext ctx2) throws FetchException {
+       public SingleFileFetcher(SingleFileFetcher fetcher, Metadata newMeta, 
GetCompletionCallback callback, FetchContext ctx2) throws FetchException {
                super(fetcher.key, fetcher.maxRetries, ctx2, fetcher.parent, 
callback, false, fetcher.token);
                logMINOR = Logger.shouldLog(Logger.MINOR, this);
                if(logMINOR) Logger.minor(this, "Creating SingleFileFetcher for 
"+fetcher.key+" meta="+fetcher.metaStrings.toString(), new Exception("debug"));
@@ -432,7 +432,7 @@
                Metadata newMeta = (Metadata) meta.clone();
                newMeta.setSimpleRedirect();
                SingleFileFetcher f;
-               f = new SingleFileFetcher(this, newMeta, new 
ArchiveFetcherCallback(forData), new FetcherContext(ctx, 
FetcherContext.SET_RETURN_ARCHIVES, true));
+               f = new SingleFileFetcher(this, newMeta, new 
ArchiveFetcherCallback(forData), new FetchContext(ctx, 
FetchContext.SET_RETURN_ARCHIVES, true));
                f.handleMetadata();
                // When it is done (if successful), the ArchiveCallback will 
re-call this function.
                // Which will then discover that the metadata *is* available.
@@ -530,7 +530,7 @@
         * Create a fetcher for a key.
         */
        public static ClientGetState create(ClientRequester requester, 
GetCompletionCallback cb, 
-                       ClientMetadata clientMetadata, FreenetURI uri, 
FetcherContext ctx, ArchiveContext actx, 
+                       ClientMetadata clientMetadata, FreenetURI uri, 
FetchContext ctx, ArchiveContext actx, 
                        int maxRetries, int recursionLevel, boolean 
dontTellClientGet, long l, boolean isEssential, 
                        Bucket returnBucket, boolean isFinal) throws 
MalformedURLException, FetchException {
                BaseClientKey key = BaseClientKey.getBaseKey(uri);
@@ -550,7 +550,7 @@
                }
        }

-       private static ClientGetState uskCreate(ClientRequester requester, 
GetCompletionCallback cb, ClientMetadata clientMetadata, USK usk, LinkedList 
metaStrings, FetcherContext ctx, ArchiveContext actx, int maxRetries, int 
recursionLevel, boolean dontTellClientGet, long l, boolean isEssential, Bucket 
returnBucket, boolean isFinal) throws FetchException {
+       private static ClientGetState uskCreate(ClientRequester requester, 
GetCompletionCallback cb, ClientMetadata clientMetadata, USK usk, LinkedList 
metaStrings, FetchContext ctx, ArchiveContext actx, int maxRetries, int 
recursionLevel, boolean dontTellClientGet, long l, boolean isEssential, Bucket 
returnBucket, boolean isFinal) throws FetchException {
                if(usk.suggestedEdition >= 0) {
                        // Return the latest known version but at least 
suggestedEdition.
                        long edition = ctx.uskManager.lookup(usk);
@@ -595,7 +595,7 @@
                final ClientMetadata clientMetadata;
                final USK usk;
                final LinkedList metaStrings;
-               final FetcherContext ctx;
+               final FetchContext ctx;
                final ArchiveContext actx;
                final int maxRetries;
                final int recursionLevel;
@@ -603,7 +603,7 @@
                final long token;
                final Bucket returnBucket;

-               public MyUSKFetcherCallback(ClientRequester requester, 
GetCompletionCallback cb, ClientMetadata clientMetadata, USK usk, LinkedList 
metaStrings, FetcherContext ctx, ArchiveContext actx, int maxRetries, int 
recursionLevel, boolean dontTellClientGet, long l, Bucket returnBucket) {
+               public MyUSKFetcherCallback(ClientRequester requester, 
GetCompletionCallback cb, ClientMetadata clientMetadata, USK usk, LinkedList 
metaStrings, FetchContext ctx, ArchiveContext actx, int maxRetries, int 
recursionLevel, boolean dontTellClientGet, long l, Bucket returnBucket) {
                        this.parent = requester;
                        this.cb = cb;
                        this.clientMetadata = clientMetadata;

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcher.java        
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcher.java        
2007-02-16 20:00:59 UTC (rev 11818)
@@ -11,7 +11,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.Metadata;
 import freenet.client.MetadataParseException;
 import freenet.keys.CHKBlock;
@@ -29,7 +29,7 @@
  */
 public class SplitFileFetcher implements ClientGetState {

-       final FetcherContext fetchContext;
+       final FetchContext fetchContext;
        final ArchiveContext archiveContext;
        final LinkedList decompressors;
        final ClientMetadata clientMetadata;
@@ -62,7 +62,7 @@
        private long token;

        public SplitFileFetcher(Metadata metadata, GetCompletionCallback rcb, 
ClientRequester parent2,
-                       FetcherContext newCtx, LinkedList decompressors, 
ClientMetadata clientMetadata, 
+                       FetchContext newCtx, LinkedList decompressors, 
ClientMetadata clientMetadata, 
                        ArchiveContext actx, int recursionLevel, Bucket 
returnBucket, long token2) throws FetchException, MetadataParseException {
                this.finished = false;
                this.returnBucket = returnBucket;

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2007-02-16 20:00:59 UTC (rev 11818)
@@ -12,7 +12,7 @@
 import freenet.client.FailureCodeTracker;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.Metadata;
 import freenet.client.MetadataParseException;
 import freenet.client.SplitfileBlock;
@@ -39,7 +39,7 @@
        final int minFetched;
        final SplitFileFetcher parentFetcher;
        final ArchiveContext archiveContext;
-       final FetcherContext fetcherContext;
+       final FetchContext fetcherContext;
        final long maxBlockLength;
        /** Has the segment finished processing? Irreversible. */
        private boolean finished;
@@ -47,7 +47,7 @@
        /** Bucket to store the data retrieved, after it has been decoded */
        private Bucket decodedData;
        /** Fetch context for block fetches */
-       final FetcherContext blockFetchContext;
+       final FetchContext blockFetchContext;
        /** Recursion level */
        final int recursionLevel;
        private FetchException failureException;
@@ -56,7 +56,7 @@
        private int fetchedBlocks;
        private final FailureCodeTracker errors;

-       public SplitFileFetcherSegment(short splitfileType, FreenetURI[] 
splitfileDataBlocks, FreenetURI[] splitfileCheckBlocks, SplitFileFetcher 
fetcher, ArchiveContext archiveContext, FetcherContext fetchContext, long 
maxTempLength, int recursionLevel) throws MetadataParseException, 
FetchException {
+       public SplitFileFetcherSegment(short splitfileType, FreenetURI[] 
splitfileDataBlocks, FreenetURI[] splitfileCheckBlocks, SplitFileFetcher 
fetcher, ArchiveContext archiveContext, FetchContext fetchContext, long 
maxTempLength, int recursionLevel) throws MetadataParseException, 
FetchException {
                logMINOR = Logger.shouldLog(Logger.MINOR, this);
                this.parentFetcher = fetcher;
                this.errors = new FailureCodeTracker(false);
@@ -82,7 +82,7 @@
                        checkBuckets[i] = new 
MinimalSplitfileBlock(i+dataBuckets.length);
                this.fetcherContext = fetchContext;
                maxBlockLength = maxTempLength;
-               blockFetchContext = new FetcherContext(fetcherContext, 
FetcherContext.SPLITFILE_DEFAULT_BLOCK_MASK, true);
+               blockFetchContext = new FetchContext(fetcherContext, 
FetchContext.SPLITFILE_DEFAULT_BLOCK_MASK, true);
                this.recursionLevel = 0;
                if(logMINOR) Logger.minor(this, "Created "+this+" for 
"+parentFetcher);
                for(int i=0;i<dataBlocks.length;i++)

Modified: trunk/freenet/src/freenet/client/async/USKChecker.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKChecker.java      2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/USKChecker.java      2007-02-16 
20:00:59 UTC (rev 11818)
@@ -3,7 +3,7 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.client.async;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.keys.ClientKey;
 import freenet.keys.ClientKeyBlock;
 import freenet.keys.ClientSSKBlock;
@@ -18,7 +18,7 @@
        final USKCheckerCallback cb;
        private int dnfs;

-       USKChecker(USKCheckerCallback cb, ClientKey key, int maxRetries, 
FetcherContext ctx, ClientRequester parent) {
+       USKChecker(USKCheckerCallback cb, ClientKey key, int maxRetries, 
FetchContext ctx, ClientRequester parent) {
                super(key, maxRetries, ctx, parent);
         if(Logger.shouldLog(Logger.MINOR, this))
                Logger.minor(this, "Created USKChecker for "+key);

Modified: trunk/freenet/src/freenet/client/async/USKFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKFetcher.java      2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/USKFetcher.java      2007-02-16 
20:00:59 UTC (rev 11818)
@@ -9,7 +9,7 @@
 import java.util.LinkedList;
 import java.util.Vector;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.keys.ClientSSKBlock;
 import freenet.keys.FreenetURI;
 import freenet.keys.KeyDecodeException;
@@ -74,7 +74,7 @@
        private final LinkedList callbacks;

        /** Fetcher context */
-       final FetcherContext ctx;
+       final FetchContext ctx;

        /** Finished? */
        private boolean completed;
@@ -200,12 +200,12 @@

        private int token;

-       USKFetcher(USK origUSK, USKManager manager, FetcherContext ctx, 
ClientRequester requester, int minFailures, boolean pollForever, boolean 
keepLastData, int token) {
+       USKFetcher(USK origUSK, USKManager manager, FetchContext ctx, 
ClientRequester requester, int minFailures, boolean pollForever, boolean 
keepLastData, int token) {
                this(origUSK, manager, ctx, requester, minFailures, 
pollForever, DEFAULT_MAX_MIN_FAILURES, keepLastData, token);
        }

        // FIXME use this!
-       USKFetcher(USK origUSK, USKManager manager, FetcherContext ctx, 
ClientRequester requester, int minFailures, boolean pollForever, long 
maxProbeEditions, boolean keepLastData, int token) {
+       USKFetcher(USK origUSK, USKManager manager, FetchContext ctx, 
ClientRequester requester, int minFailures, boolean pollForever, long 
maxProbeEditions, boolean keepLastData, int token) {
                this.parent = requester;
                this.maxMinFailures = maxProbeEditions;
                this.origUSK = origUSK;

Modified: trunk/freenet/src/freenet/client/async/USKManager.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKManager.java      2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/USKManager.java      2007-02-16 
20:00:59 UTC (rev 11818)
@@ -5,7 +5,7 @@

 import java.util.HashMap;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.keys.USK;
 import freenet.node.NodeClientCore;
 import freenet.node.RequestStarter;
@@ -38,11 +38,11 @@
        /** USKChecker's by USK. Deleted immediately on completion. */
        final HashMap checkersByUSK;

-       final FetcherContext backgroundFetchContext;
+       final FetchContext backgroundFetchContext;
        final ClientRequestScheduler chkRequestScheduler;
        final ClientRequestScheduler sskRequestScheduler;

-       public USKManager(FetcherContext backgroundFetchContext, 
ClientRequestScheduler chkRequestScheduler, ClientRequestScheduler 
sskRequestScheduler) {
+       public USKManager(FetchContext backgroundFetchContext, 
ClientRequestScheduler chkRequestScheduler, ClientRequestScheduler 
sskRequestScheduler) {
                latestVersionByClearUSK = new HashMap();
                subscribersByClearUSK = new HashMap();
                fetchersByUSK = new HashMap();
@@ -79,7 +79,7 @@
                else return -1;
        }

-       public synchronized USKFetcher getFetcher(USK usk, FetcherContext ctx,
+       public synchronized USKFetcher getFetcher(USK usk, FetchContext ctx,
                        ClientRequester requester, boolean keepLastData) {
                USKFetcher f = (USKFetcher) fetchersByUSK.get(usk);
                USK clear = usk.clearCopy();
@@ -234,7 +234,7 @@
         * @param fctx Fetcher context for actually fetching the keys. Not used 
by the USK polling.
         * @return
         */
-       public USKRetriever subscribeContent(USK origUSK, USKRetrieverCallback 
cb, boolean runBackgroundFetch, FetcherContext fctx, short prio, Object client) 
{
+       public USKRetriever subscribeContent(USK origUSK, USKRetrieverCallback 
cb, boolean runBackgroundFetch, FetchContext fctx, short prio, Object client) {
                USKRetriever ret = new USKRetriever(fctx, prio, 
chkRequestScheduler, sskRequestScheduler, client, cb);
                subscribe(origUSK, ret, runBackgroundFetch, client);
                return ret;

Modified: trunk/freenet/src/freenet/client/async/USKRetriever.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKRetriever.java    2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/client/async/USKRetriever.java    2007-02-16 
20:00:59 UTC (rev 11818)
@@ -9,7 +9,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.keys.FreenetURI;
 import freenet.keys.USK;
 import freenet.support.Logger;
@@ -20,10 +20,10 @@
 public class USKRetriever extends BaseClientGetter implements USKCallback {

        /** Context for fetching data */
-       final FetcherContext ctx;
+       final FetchContext ctx;
        final USKRetrieverCallback cb;

-       public USKRetriever(FetcherContext fctx, short prio, 
ClientRequestScheduler chkSched, 
+       public USKRetriever(FetchContext fctx, short prio, 
ClientRequestScheduler chkSched, 
                        ClientRequestScheduler sskSched, Object client, 
USKRetrieverCallback cb) {
                super(prio, chkSched, sskSched, client);
                this.ctx = fctx;

Modified: trunk/freenet/src/freenet/clients/http/NinjaSpider.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/NinjaSpider.java     2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/clients/http/NinjaSpider.java     2007-02-16 
20:00:59 UTC (rev 11818)
@@ -35,7 +35,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.InserterException;
 import freenet.client.async.BaseClientPutter;
 import freenet.client.async.ClientCallback;
@@ -93,7 +93,7 @@
        private int maxShownURIs = 50;

        private NodeClientCore core;
-       private FetcherContext ctx;
+       private FetchContext ctx;
        private final short PRIORITY_CLASS = 
RequestStarter.PREFETCH_PRIORITY_CLASS;
        private boolean stopped = true;


Modified: trunk/freenet/src/freenet/clients/http/Spider.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/Spider.java  2007-02-16 19:56:40 UTC 
(rev 11817)
+++ trunk/freenet/src/freenet/clients/http/Spider.java  2007-02-16 20:00:59 UTC 
(rev 11818)
@@ -25,7 +25,7 @@
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.InserterException;
 import freenet.client.async.BaseClientPutter;
 import freenet.client.async.ClientCallback;
@@ -68,7 +68,7 @@
        private int maxShownURIs = 50;

        private NodeClientCore core;
-       private FetcherContext ctx;
+       private FetchContext ctx;
        private final short PRIORITY_CLASS = 
RequestStarter.PREFETCH_PRIORITY_CLASS;
        private boolean stopped = true;


Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2007-02-16 19:56:40 UTC (rev 
11817)
+++ trunk/freenet/src/freenet/node/Node.java    2007-02-16 20:00:59 UTC (rev 
11818)
@@ -38,7 +38,7 @@
 import com.sleepycat.je.EnvironmentMutableConfig;
 import com.sleepycat.je.StatsConfig;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.config.FreenetFilePersistentConfig;
 import freenet.config.InvalidConfigValueException;
 import freenet.config.PersistentConfig;
@@ -324,8 +324,8 @@
        InsertableClientSSK myOldARK;
        /** My old ARK sequence number */
        long myOldARKNumber;
-       /** FetcherContext for ARKs */
-       public final FetcherContext arkFetcherContext;
+       /** FetchContext for ARKs */
+       public final FetchContext arkFetcherContext;
        /** Next time to log the PeerNode status summary */
        private long nextPeerNodeStatusLogTime = -1;
        /** PeerNode status summary log interval (milliseconds) */
@@ -1416,7 +1416,7 @@
                pluginManager = new PluginManager(this);
                pluginManager2 = new 
freenet.oldplugins.plugin.PluginManager(this);

-               FetcherContext ctx = clientCore.makeClient((short)0, 
true).getFetcherContext();
+               FetchContext ctx = clientCore.makeClient((short)0, 
true).getFetcherContext();

                ctx.allowSplitfiles = false;
                ctx.dontEnterImplicitArchives = true;

Modified: trunk/freenet/src/freenet/node/SendableGet.java
===================================================================
--- trunk/freenet/src/freenet/node/SendableGet.java     2007-02-16 19:56:40 UTC 
(rev 11817)
+++ trunk/freenet/src/freenet/node/SendableGet.java     2007-02-16 20:00:59 UTC 
(rev 11818)
@@ -3,7 +3,7 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.node;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.async.BaseClientGetter;
 import freenet.client.async.ClientRequester;
 import freenet.keys.ClientCHK;
@@ -24,7 +24,7 @@
        public abstract ClientKey getKey();

        /** Get the fetch context (settings) object. */
-       public abstract FetcherContext getContext();
+       public abstract FetchContext getContext();

        /** Called when/if the low-level request succeeds. */
        public abstract void onSuccess(ClientKeyBlock block, boolean fromStore);
@@ -55,7 +55,7 @@
                // Do we need to support the last 3?
                ClientKeyBlock block;
                try {
-                       FetcherContext ctx = getContext();
+                       FetchContext ctx = getContext();
                        block = core.realGetKey(getKey(), ctx.localRequestOnly, 
ctx.cacheLocalRequests, ctx.ignoreStore);
                } catch (LowLevelGetException e) {
                        onFailure(e);

Modified: trunk/freenet/src/freenet/node/fcp/ClientGet.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientGet.java   2007-02-16 19:56:40 UTC 
(rev 11817)
+++ trunk/freenet/src/freenet/node/fcp/ClientGet.java   2007-02-16 20:00:59 UTC 
(rev 11818)
@@ -10,7 +10,7 @@

 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.InserterException;
 import freenet.client.async.BaseClientPutter;
 import freenet.client.async.ClientCallback;
@@ -36,7 +36,7 @@
  */
 public class ClientGet extends ClientRequest implements ClientCallback, 
ClientEventListener {

-       private final FetcherContext fctx;
+       private final FetchContext fctx;
        private final ClientGetter getter;
        private final short returnType;
        private final File targetFile;
@@ -77,7 +77,7 @@
                                (persistRebootOnly ? 
ClientRequest.PERSIST_REBOOT : ClientRequest.PERSIST_FOREVER),
                                                null, true);

-               fctx = new FetcherContext(client.defaultFetchContext, 
FetcherContext.IDENTICAL_MASK, false);
+               fctx = new FetchContext(client.defaultFetchContext, 
FetchContext.IDENTICAL_MASK, false);
                fctx.eventProducer.addEventListener(this);
                fctx.localRequestOnly = dsOnly;
                fctx.ignoreStore = ignoreDS;
@@ -131,7 +131,7 @@
                                message.persistenceType, message.clientToken, 
message.global);
                // Create a Fetcher directly in order to get more fine-grained 
control,
                // since the client may override a few context elements.
-               fctx = new FetcherContext(client.defaultFetchContext, 
FetcherContext.IDENTICAL_MASK, false);
+               fctx = new FetchContext(client.defaultFetchContext, 
FetchContext.IDENTICAL_MASK, false);
                fctx.eventProducer.addEventListener(this);
                // ignoreDS
                fctx.localRequestOnly = message.dsOnly;
@@ -207,7 +207,7 @@
                boolean ignoreDS = Fields.stringToBool(fs.get("IgnoreDS"), 
false);
                boolean dsOnly = Fields.stringToBool(fs.get("DSOnly"), false);
                int maxRetries = Integer.parseInt(fs.get("MaxRetries"));
-               fctx = new FetcherContext(client.defaultFetchContext, 
FetcherContext.IDENTICAL_MASK, false);
+               fctx = new FetchContext(client.defaultFetchContext, 
FetchContext.IDENTICAL_MASK, false);
                fctx.eventProducer.addEventListener(this);
                // ignoreDS
                fctx.localRequestOnly = dsOnly;

Modified: trunk/freenet/src/freenet/node/fcp/FCPClient.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPClient.java   2007-02-16 19:56:40 UTC 
(rev 11817)
+++ trunk/freenet/src/freenet/node/fcp/FCPClient.java   2007-02-16 20:00:59 UTC 
(rev 11818)
@@ -6,7 +6,7 @@
 import java.util.LinkedList;
 import java.util.Vector;

-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.HighLevelSimpleClient;
 import freenet.client.InserterContext;
 import freenet.node.NodeClientCore;
@@ -63,7 +63,7 @@
        private final HashMap clientRequestsByIdentifier;
        /** Client (one FCPClient = one HighLevelSimpleClient = one round-robin 
slot) */
        private final HighLevelSimpleClient client;
-       public final FetcherContext defaultFetchContext;
+       public final FetchContext defaultFetchContext;
        public final InserterContext defaultInsertContext;
        public final NodeClientCore core;
        /** Are we the global queue? */

Modified: trunk/freenet/src/freenet/node/fcp/FCPServer.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPServer.java   2007-02-16 19:56:40 UTC 
(rev 11817)
+++ trunk/freenet/src/freenet/node/fcp/FCPServer.java   2007-02-16 20:00:59 UTC 
(rev 11818)
@@ -25,7 +25,7 @@
 import org.tanukisoftware.wrapper.WrapperManager;

 import freenet.client.DefaultMIMETypes;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.HighLevelSimpleClient;
 import freenet.client.InserterContext;
 import freenet.config.Config;
@@ -70,7 +70,7 @@
        private FCPServerPersister persister;
        private boolean haveLoadedPersistentRequests;
        private long persistenceInterval;
-       final FetcherContext defaultFetchContext;
+       final FetchContext defaultFetchContext;
        public InserterContext defaultInsertContext;
        public static final int QUEUE_MAX_RETRIES = -1;
        public static final long QUEUE_MAX_DATA_SIZE = Long.MAX_VALUE;

Modified: trunk/freenet/src/freenet/node/updater/NodeUpdater.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/NodeUpdater.java     2007-02-16 
19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/node/updater/NodeUpdater.java     2007-02-16 
20:00:59 UTC (rev 11818)
@@ -7,7 +7,7 @@

 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.InserterException;
 import freenet.client.async.BaseClientPutter;
 import freenet.client.async.ClientCallback;
@@ -25,7 +25,7 @@

 public class NodeUpdater implements ClientCallback, USKCallback {
        static private boolean logMINOR;
-       private FetcherContext ctx;
+       private FetchContext ctx;
        private FetchResult result;
        private ClientGetter cg;
        private boolean finalCheck;
@@ -60,7 +60,7 @@
                this.isFetching = false;
                this.extUpdate = extUpdate;

-               FetcherContext tempContext = core.makeClient((short)0, 
true).getFetcherContext();               
+               FetchContext tempContext = core.makeClient((short)0, 
true).getFetcherContext();         
                tempContext.allowSplitfiles = true;
                tempContext.dontEnterImplicitArchives = false;
                this.ctx = tempContext;

Modified: trunk/freenet/src/freenet/node/updater/RevocationChecker.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/RevocationChecker.java       
2007-02-16 19:56:40 UTC (rev 11817)
+++ trunk/freenet/src/freenet/node/updater/RevocationChecker.java       
2007-02-16 20:00:59 UTC (rev 11818)
@@ -2,7 +2,7 @@

 import freenet.client.FetchException;
 import freenet.client.FetchResult;
-import freenet.client.FetcherContext;
+import freenet.client.FetchContext;
 import freenet.client.InserterException;
 import freenet.client.async.BaseClientPutter;
 import freenet.client.async.ClientCallback;
@@ -25,7 +25,7 @@
        private NodeUpdaterManager manager;
        private NodeClientCore core;
        private int revocationDNFCounter;
-       private FetcherContext ctxRevocation;
+       private FetchContext ctxRevocation;
        private ClientGetter revocationGetter;
        private boolean wasAggressive;
        /** Last time at which we got 3 DNFs on the revocation key */


Reply via email to