public void connected(Channel channel) throws IOException {
		try {
			log.fine(channel+"mockserver accepted connection");
			sockets.add((TCPChannel) channel);
			channel.registerForReads(MockNIOServer.this);
			methodCalled(CONNECTED, channel);
		} catch (RuntimeException e) {
			log.log(Level.WARNING, "Exception", e);
			//puts exception on test thread.
			methodCalled(CONNECTED, e);
		}		
	}