Pass request as well as response to each handler to make the code more readable, even though it can be obtained using getRequest(). Move each handler to a separate class that must implement Handler interface. Hold handler class instead of method reference in handlers map.