final SocketChannel channel = server.accept();
if (channel != null)
{
HTTPIOHandler handler;
if(servChannels.get(server).booleanValue())
handler=new HTTPSReader(this, channel, sslContext);
else
handler=new HTTPReader(this, channel);
channel.configureBlocking (false);
channel.register (servSelector, SelectionKey.OP_READ, handler);
synchronized(handlers) // synched because you can't iterate and modify, and because its a linkedlist