Learning to create a request router with reflection in Java