log.debug("About to connect to the server...");
ConnectFuture connFuture = connector.connect(new InetSocketAddress(
"localhost", MemoryMonitor.PORT));
log.debug("About to wait.");
connFuture.awaitUninterruptibly();
log.debug("Adding a future listener.");
connFuture.addListener(new IoFutureListener<ConnectFuture>() {
public void operationComplete(ConnectFuture future) {
if (future.isConnected()) {