void dispatch(final Connection conn) throws Exception {
new Thread(tg, new Runnable() { public void run() {
+ String local = conn.getLocalAddress() + ":" + conn.getLocalPort();
+ String remote = conn.getRemoteHostname() + ":" + conn.getRemotePort();
try {
Class c = findListener();
if (c == null) throw new RuntimeException("couldn't find listener");
- Log.info(this, "dispatching connection on port " + port + " to " + c.getName());
+ Log.info("["+local+"]", "connection from " + remote + " => " + c.getName());
Log.clearnotes();
final ClassLoader cl = getClassLoader();
Thread.currentThread().setContextClassLoader(cl);
Listener l = (Listener)c.newInstance();
l.accept(conn);
+ } catch (org.ibex.io.Stream.EOF eof) {
+ Log.warn(this, "end of stream reached handling connection from " +
+ conn.getRemoteHostname() + ":" + conn.getRemotePort());
} catch (Exception e) {
Log.error(this, "Listener threw exception");
Log.error(this, e);