private class MessageHandler extends Thread {
public void run() {
try {
while(! quit) { // keep snarfing up messages
Message message = Connection.this.receive();
if (message != null) { // ignore spurious nulls in stream
if (DEBUG)
Aleph.debug("Connection received " + message);
if (message instanceof AsynchMessage)
scheduler.schedule(message); // place in work pool
else
message.run(); // run it immediately
}
}
} catch(java.io.IOException e) {
return;
} catch(Exception e) {