class Main {

    static Routing createRouting() {
        UpperXFilter upperXFilter = new UpperXFilter();
        return Routing.builder()
                    .any(new UserFilter())
                    .any((req, res) -> {
                        res.registerFilter(upperXFilter);
                        req.next();
                    })
                    .register("/article", new CommentService())
                    .post("/mgmt/shutdown", (req, res) -> {
                        res.headers().contentType(MediaType.TEXT_PLAIN.withCharset("UTF-8"));
                        res.send("Shutting down TUTORIAL server. Good bye!\n");
                        // Use reactive API nature to stop the server AFTER the response was sent.
                        res.whenSent().thenRun(() -> req.webServer().shutdown());
                    })
                    .build();
    }

    private  Main();

}