@Override
            public Observable<Void> call(ByteBuf byteBuf) {
                String formatted = byteBuf.toString(Charset.defaultCharset());
                System.out.println("    movie: " + formatted);
                try {
                    Movie movie = Movie.from(formatted);
                    movies.put(movie.getId(), movie);
                    response.setStatus(HttpResponseStatus.CREATED);
                } catch (Exception e) {
                    System.err.println("Invalid movie content");
                    e.printStackTrace();
                    response.setStatus(HttpResponseStatus.BAD_REQUEST);
                }
                return response.close();
            }
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