1 // Copyright 2000-2005 the Contributors, as shown in the revision logs.
2 // Licensed under the Apache Public Source License 2.0 ("the License").
3 // You may not use this file except in compliance with the License.
5 package org.ibex.jinetd;
6 import org.ibex.util.*;
9 import java.lang.reflect.*;
11 public class Host extends Loader {
13 final String hostname;
14 public Host(String path, String hostname) { super(path); this.hostname = hostname; }
16 public void changed(Watched w) {
18 Log.debug(this, "changed(" + w + ")");
20 ClassLoader cl = getClassLoader();
21 if (cl == null) return;
22 Class c = cl.loadClass("Main");
23 if (c == null) return;
24 Method m = c.getMethod("main", new Class[] { });
25 m.invoke(null, new Object[] { });
26 } catch (Exception e) {
27 Log.warn(this, "nope");