yacy_search_server/htroot/test.java
orbiter 3197ca42ed preparations to move the HTCache into cora:
- move the header framework classes to cora
- move the ARC caching classes to cora
- refactoring of code to call these classes from cora

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7068 6c8d7289-2bf4-0310-a012-ef5d649a1542
2010-08-23 12:32:02 +00:00

28 lines
728 B
Java

//
//$LastChangedDate$
//$LastChangedRevision$
//$LastChangedBy$
//
import net.yacy.cora.protocol.RequestHeader;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class test {
// http://localhost:8080/test.xml?count=10
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final int count = Math.min(1000, (post == null) ? 0 : post.getInt("count", 0));
for (int i = 0; i < count; i++) {
prop.put("item_" + i + "_text", Integer.toString(i));
}
prop.put("item", count);
return prop;
}
}