On Wednesday 13 June 2007 17:37, [EMAIL PROTECTED] wrote:
> + public void handleGet(HTTPRequest request, ToadletContext context)
> throws
> IOException, ToadletContextClosedException { + String action =
> request.getParam("action");
> + PageMaker pageMaker = context.getPageMaker();
> + if ((action == null) || (action.length() == 0)) {
> + MultiValueTable responseHeaders = new MultiValueTable();
> + responseHeaders.put("Location", "?action=list");
> + context.sendReplyHeaders(301, "Redirect",
> responseHeaders, "text/html;
> charset=utf-8", 0); + return;
> + } else if ("list".equals(action)) {
> +
> + String listName = request.getParam("listName", null);
> + HTMLNode pageNode = pageMaker.getPageNode("The XML
> Spider", context);
> + HTMLNode contentNode =
> pageMaker.getContentNode(pageNode);
> + /* create copies for multi-threaded use */
> + if (listName == null) {
> + Map runningFetches = new
> HashMap(runningFetchesByURI);
> + List queued = new ArrayList(queuedURIList);
> + Set visited = new HashSet(visitedURIs);
> + Set failed = new HashSet(failedURIs);Copying should be done synchronized, presumably? And if you're just listing them, probably to a FreenetURI[] or something? Alternatively, just hold the lock over this whole sub-block? > + contentNode.addChild(createNavbar(pageMaker, > runningFetches.size(), > queued.size(), visited.size(), failed.size())); > + contentNode.addChild(createAddBox(pageMaker, > context)); > + contentNode.addChild(createList(pageMaker, > "Running FetcheIIIs", > "running", runningFetches.keySet(), maxShownURIs)); What's a Fetchelll? :)
pgp0r1pUijnq8.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
