public HttpServer<ByteBuf, ByteBuf> createServer() {
        HttpServer<ByteBuf, ByteBuf> server = RxNetty.newHttpServerBuilder(port, new RequestHandler<ByteBuf, ByteBuf>() {
            @Override
            public Observable<Void> handle(HttpServerRequest<ByteBuf> request, final HttpServerResponse<ByteBuf> response) {
                if (request.getPath().contains("/users")) {
                    if (request.getHttpMethod().equals(HttpMethod.GET)) {
                        return handleRecommendationsByUserId(request, response);
                    } else {
                        return handleUpdateRecommendationsForUser(request, response);
                    }
                }
                if (request.getPath().contains("/recommendations")) {
                    return handleRecommendationsBy(request, response);
                }
                if (request.getPath().contains("/movies")) {
                    return handleRegisterMovie(request, response);
                }
                response.setStatus(HttpResponseStatus.NOT_FOUND);
                return response.close();
            }
        }).pipelineConfigurator(PipelineConfigurators.<ByteBuf, ByteBuf>httpServerConfigurator()).enableWireLogging(LogLevel.ERROR).build();

        System.out.println("RxMovie server started...");
        return server;
    }
The client examples assume that the movie server runs on the default port 8080.

@author Tomasz Bak
ribbon-examples/src/main/java/com/netflix/ribbon/examples/rx/RxMovieServer.java