I've finally put the connection handler in the HttpConnectionHandler class