    public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
        plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
        serverObjects prop = new serverObjects();
        prop.put("rejected", 0);
        int showRejectedCount = 10;
        if (post != null) {
            if (post.containsKey("clearRejected")) {
                switchboard.urlPool.errorURL.clearStack();
            } 
            if (post.containsKey("moreRejected")) {
                showRejectedCount = Integer.parseInt(post.get("showRejected", "10"));
            }
            if (post.containsKey("clearIndexingQueue")) {
                try {
                    synchronized (switchboard.sbQueue) {
                        plasmaSwitchboardQueue.Entry entry = null;
                        while ((entry = switchboard.sbQueue.pop()) != null) {
                            if ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) {
                                switchboard.cacheManager.deleteFile(entry.url());
                            }                            
                        }
                    } 
                } catch (Exception e) {}
            } else if (post.containsKey("deleteEntry")) {
                String urlHash = (String) post.get("deleteEntry");
                try {
                    synchronized (switchboard.sbQueue) {
                        ArrayList entries = switchboard.sbQueue.list(0);
                        for (int i=entries.size()-1; i >= 0; i--) {
                            plasmaSwitchboardQueue.Entry pcentry = (plasmaSwitchboardQueue.Entry) entries.get(i);
                            if (pcentry.urlHash().equals(urlHash)) {
                                plasmaSwitchboardQueue.Entry entry = switchboard.sbQueue.remove(i);
                                if ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) {
                                    switchboard.cacheManager.deleteFile(entry.url());
                                }
                                break;
                            }
                        }
                    } 
                } catch (Exception e) {}
                prop.put("LOCATION","");
                return prop;
            }
        }
        yacySeed initiator;
        boolean dark;
        if ((switchboard.sbQueue.size() == 0) && (switchboard.indexingTasksInProcess.size() == 0)) {
            prop.put("indexing-queue", 0); 
        } else {
            prop.put("indexing-queue", 1); 
            dark = true;
            plasmaSwitchboardQueue.Entry pcentry;
            int inProcessCount = 0, entryCount = 0;
            long totalSize = 0;
            try {
                ArrayList entryList = new ArrayList();
                synchronized (switchboard.indexingTasksInProcess) {
                    inProcessCount = switchboard.indexingTasksInProcess.size();
                    entryList.addAll(switchboard.indexingTasksInProcess.values());
                }
                if ((switchboard.sbQueue.size() > 0)) {
                    entryList.addAll(switchboard.sbQueue.list(0));
                }
                int count=entryList.size();
                if(count>100)count=100;
                for (int i = 0; i < count; i++) {
                    boolean inProcess = i < inProcessCount;
                    pcentry = (plasmaSwitchboardQueue.Entry) entryList.get(i);
                    long entrySize = pcentry.size();
                    totalSize += entrySize;
                    if ((pcentry != null)&&(pcentry.url() != null)) {
                        initiator = yacyCore.seedDB.getConnected(pcentry.initiator());
                        prop.put("indexing-queue_list_"+entryCount+"_dark", (inProcess)? 2: ((dark) ? 1 : 0));
                        prop.put("indexing-queue_list_"+entryCount+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())));
                        prop.put("indexing-queue_list_"+entryCount+"_depth", pcentry.depth());
                        prop.put("indexing-queue_list_"+entryCount+"_modified", (pcentry.responseHeader() == null) ? "" : daydate(pcentry.responseHeader().lastModified()));
                        prop.put("indexing-queue_list_"+entryCount+"_anchor", (pcentry.anchorName()==null)?"":pcentry.anchorName());
                        prop.put("indexing-queue_list_"+entryCount+"_url", wikiCode.replaceHTML(pcentry.normalizedURLString()));
                        prop.put("indexing-queue_list_"+entryCount+"_size", bytesToString(entrySize));
                        prop.put("indexing-queue_list_"+entryCount+"_inProcess", (inProcess)?1:0);
                        prop.put("indexing-queue_list_"+entryCount+"_inProcess_hash", pcentry.urlHash());
                        dark = !dark;
                        entryCount++;
                    }
                }
            } catch (IOException e) {}
            prop.put("indexing-queue_num", entryCount);
            prop.put("indexing-queue_totalSize", bytesToString(totalSize));
            prop.put("indexing-queue_list", entryCount);
        }
        if (switchboard.urlPool.errorURL.stackSize() != 0) {
            if (showRejectedCount > switchboard.urlPool.errorURL.stackSize()) showRejectedCount = switchboard.urlPool.errorURL.stackSize();
            prop.put("rejected", 1);
            prop.put("rejected_num", switchboard.urlPool.errorURL.stackSize());
            if (showRejectedCount != switchboard.urlPool.errorURL.stackSize()) {
                prop.put("rejected_only-latest", 1);
                prop.put("rejected_only-latest_num", showRejectedCount);
                prop.put("rejected_only-latest_newnum", ((int) (showRejectedCount * 1.5)));
            }else{
                prop.put("rejected_only-latest", 0);
            }
            dark = true;
            String url, initiatorHash, executorHash;
            plasmaCrawlEURL.Entry entry;
            yacySeed initiatorSeed, executorSeed;
            int j=0;
            for ( int i = switchboard.urlPool.errorURL.stackSize() - 1; i >= (switchboard.urlPool.errorURL.stackSize() - showRejectedCount); i--) {
                entry = (plasmaCrawlEURL.Entry) switchboard.urlPool.errorURL.getStack(i);
                initiatorHash = entry.initiator();
                executorHash = entry.executor();
                url = entry.url().toString();
                initiatorSeed = yacyCore.seedDB.getConnected(initiatorHash);
                executorSeed = yacyCore.seedDB.getConnected(executorHash);
                prop.put("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : wikiCode.replaceHTML(initiatorSeed.getName())));
                prop.put("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : wikiCode.replaceHTML(executorSeed.getName())));
                prop.put("rejected_list_"+j+"_url", wikiCode.replaceHTML(url));
                prop.put("rejected_list_"+j+"_failreason", entry.failreason());
                prop.put("rejected_list_"+j+"_dark", ((dark) ? 1 : 0));
                dark = !dark;
                j++;
            }
            prop.put("rejected_list", j);
        }
        return prop;
    }

    public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
        plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
        serverObjects prop = new serverObjects();
        prop.put("rejected", 0);
        int showRejectedCount = 10;
        if (post != null) {
            if (post.containsKey("clearRejected")) {
                switchboard.urlPool.errorURL.clearStack();
            } 
            if (post.containsKey("moreRejected")) {
                showRejectedCount = Integer.parseInt(post.get("showRejected", "10"));
            }
            if (post.containsKey("clearIndexingQueue")) {
                try {
                    synchronized (switchboard.sbQueue) {
                        plasmaSwitchboardQueue.Entry entry = null;
                        while ((entry = switchboard.sbQueue.pop()) != null) {
                            if ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) {
                                switchboard.cacheManager.deleteFile(entry.url());
                            }                            
                        }
                    } 
                } catch (Exception e) {}
            } else if (post.containsKey("deleteEntry")) {
                String urlHash = (String) post.get("deleteEntry");
                try {
                    synchronized (switchboard.sbQueue) {
                        ArrayList entries = switchboard.sbQueue.list(0);
                        for (int i=entries.size()-1; i >= 0; i--) {
                            plasmaSwitchboardQueue.Entry pcentry = (plasmaSwitchboardQueue.Entry) entries.get(i);
                            if (pcentry.urlHash().equals(urlHash)) {
                                plasmaSwitchboardQueue.Entry entry = switchboard.sbQueue.remove(i);
                                if ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) {
                                    switchboard.cacheManager.deleteFile(entry.url());
                                }
                                break;
                            }
                        }
                    } 
                } catch (Exception e) {}
                prop.put("LOCATION","");
                return prop;
            }
        }
        yacySeed initiator;
        boolean dark;
        if ((switchboard.sbQueue.size() == 0) && (switchboard.indexingTasksInProcess.size() == 0)) {
            prop.put("indexing-queue", 0); 
        } else {
            prop.put("indexing-queue", 1); 
            dark = true;
            plasmaSwitchboardQueue.Entry pcentry;
            int inProcessCount = 0, entryCount = 0;
            long totalSize = 0;
            try {
                ArrayList entryList = new ArrayList();
                synchronized (switchboard.indexingTasksInProcess) {
                    inProcessCount = switchboard.indexingTasksInProcess.size();
                    entryList.addAll(switchboard.indexingTasksInProcess.values());
                }
                if ((switchboard.sbQueue.size() > 0)) {
                    entryList.addAll(switchboard.sbQueue.list(0));
                }
                for (int i = 0; i < entryList.size(); i++) {
                    boolean inProcess = i < inProcessCount;
                    pcentry = (plasmaSwitchboardQueue.Entry) entryList.get(i);
                    long entrySize = pcentry.size();
                    totalSize += entrySize;
                    if ((pcentry != null)&&(pcentry.url() != null)) {
                        initiator = yacyCore.seedDB.getConnected(pcentry.initiator());
                        prop.put("indexing-queue_list_"+entryCount+"_dark", (inProcess)? 2: ((dark) ? 1 : 0));
                        prop.put("indexing-queue_list_"+entryCount+"_initiator", ((initiator == null) ? "proxy" : wikiCode.replaceHTML(initiator.getName())));
                        prop.put("indexing-queue_list_"+entryCount+"_depth", pcentry.depth());
                        prop.put("indexing-queue_list_"+entryCount+"_modified", (pcentry.responseHeader() == null) ? "" : daydate(pcentry.responseHeader().lastModified()));
                        prop.put("indexing-queue_list_"+entryCount+"_anchor", (pcentry.anchorName()==null)?"":wikiCode.replaceHTML(pcentry.anchorName()));
                        prop.put("indexing-queue_list_"+entryCount+"_url", wikiCode.replaceHTML(pcentry.normalizedURLString()));
                        prop.put("indexing-queue_list_"+entryCount+"_size", bytesToString(entrySize));
                        prop.put("indexing-queue_list_"+entryCount+"_inProcess", (inProcess)?1:0);
                        prop.put("indexing-queue_list_"+entryCount+"_inProcess_hash", pcentry.urlHash());
                        dark = !dark;
                        entryCount++;
                    }
                }
            } catch (IOException e) {}
            prop.put("indexing-queue_num", entryCount);
            prop.put("indexing-queue_totalSize", bytesToString(totalSize));
            prop.put("indexing-queue_list", entryCount);
        }
        if (switchboard.urlPool.errorURL.stackSize() != 0) {
            if (showRejectedCount > switchboard.urlPool.errorURL.stackSize()) showRejectedCount = switchboard.urlPool.errorURL.stackSize();
            prop.put("rejected", 1);
            prop.put("rejected_num", switchboard.urlPool.errorURL.stackSize());
            if (showRejectedCount != switchboard.urlPool.errorURL.stackSize()) {
                prop.put("rejected_only-latest", 1);
                prop.put("rejected_only-latest_num", showRejectedCount);
                prop.put("rejected_only-latest_newnum", ((int) (showRejectedCount * 1.5)));
            }else{
                prop.put("rejected_only-latest", 0);
            }
            dark = true;
            String url, initiatorHash, executorHash;
            plasmaCrawlEURL.Entry entry;
            yacySeed initiatorSeed, executorSeed;
            int j=0;
            for ( int i = switchboard.urlPool.errorURL.stackSize() - 1; i >= (switchboard.urlPool.errorURL.stackSize() - showRejectedCount); i--) {
                entry = (plasmaCrawlEURL.Entry) switchboard.urlPool.errorURL.getStack(i);
                initiatorHash = entry.initiator();
                executorHash = entry.executor();
                url = entry.url().toString();
                initiatorSeed = yacyCore.seedDB.getConnected(initiatorHash);
                executorSeed = yacyCore.seedDB.getConnected(executorHash);
                prop.put("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : wikiCode.replaceHTML(initiatorSeed.getName())));
                prop.put("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : wikiCode.replaceHTML(executorSeed.getName())));
                prop.put("rejected_list_"+j+"_url", wikiCode.replaceHTML(url));
                prop.put("rejected_list_"+j+"_failreason", entry.failreason());
                prop.put("rejected_list_"+j+"_dark", ((dark) ? 1 : 0));
                dark = !dark;
                j++;
            }
            prop.put("rejected_list", j);
        }
        return prop;
    }
