You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
788 B
30 lines
788 B
15 years ago
|
//
|
||
|
//$LastChangedDate$
|
||
|
//$LastChangedRevision$
|
||
|
//$LastChangedBy$
|
||
|
//
|
||
|
|
||
2 years ago
|
package net.yacy.htroot;
|
||
|
|
||
14 years ago
|
import net.yacy.cora.protocol.RequestHeader;
|
||
12 years ago
|
import net.yacy.server.serverObjects;
|
||
|
import net.yacy.server.serverSwitch;
|
||
17 years ago
|
|
||
|
public class test {
|
||
13 years ago
|
|
||
14 years ago
|
// http://localhost:8090/test.xml?count=10
|
||
13 years ago
|
|
||
|
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
||
17 years ago
|
final serverObjects prop = new serverObjects();
|
||
|
final int count = Math.min(1000, (post == null) ? 0 : post.getInt("count", 0));
|
||
13 years ago
|
|
||
17 years ago
|
for (int i = 0; i < count; i++) {
|
||
|
prop.put("item_" + i + "_text", Integer.toString(i));
|
||
|
}
|
||
|
prop.put("item", count);
|
||
|
|
||
|
return prop;
|
||
|
}
|
||
13 years ago
|
|
||
17 years ago
|
}
|