1 package dolda.jsvc.util;
7 public class SimpleContext implements ServerContext {
8 private final long ctime;
9 private final String name;
10 public final ClassLoader loader;
11 protected final Properties sysconfig, libconfig;
13 private void loadconfig() {
15 InputStream pi = loader.getResourceAsStream("jsvc.properties");
23 } catch(IOException e) {
28 public SimpleContext(ClassLoader cl, String name) {
29 this.ctime = System.currentTimeMillis();
32 sysconfig = new Properties();
33 libconfig = new Properties();
38 public long starttime() {
42 public String name() {
46 public String sysconfig(String key, String def) {
47 return(sysconfig.getProperty(key, def));
50 public String libconfig(String key, String def) {
51 return(libconfig.getProperty(key, def));
54 public RequestThread worker(Responder root, Request req, ThreadGroup tg, String name) {
55 return(new RequestThread(root, req, tg, name));