public Dimension getWindowSize() {
return (Dimension)bus.broadcast(new WindowSizeRequest());
}
/** notify about local echo */
public void setLocalEcho(boolean echo) {
bus.broadcast(new LocalEchoRequest(echo));
}
/** notify about EOR end of record */
public void notifyEndOfRecord() {
bus.broadcast(new EndOfRecordRequest());
}
/** write data to our back end */
public void write(byte[] b) throws IOException {
source.write(b);
}
};
// reset the telnet protocol handler just in case :-)
bus.registerPluginListener(new OnlineStatusListener() {
public void online() {
handler.reset();
try {
handler.startup();
} catch(java.io.IOException e) {
}
bus.broadcast(new LocalEchoRequest(true));
}
public void offline() {
handler.reset();
bus.broadcast(new LocalEchoRequest(true));
}
});
bus.registerPluginListener(new SetWindowSizeListener() {
public void setWindowSize(int columns, int rows) {