@Override
    public void handle(final String target, final Request jettyRequest, final HttpServletRequest request,
            final HttpServletResponse response) throws IOException, ServletException {
        if (target.length() < 2) {
            response.setStatus(HttpStatus.BadRequest);
            response.getWriter().write("Invalid request");
        }
        else {
            final char command = target.charAt(1);
            switch (command) {
            case 'g':
                this.getMessage(jettyRequest, response);
                break;
            case 'p':
                this.putMessage(jettyRequest, response);
                break;
            case 'o':
                this.getOffset(jettyRequest, response);
                break;
            default:
                response.setStatus(HttpStatus.BadRequest);
                response.getWriter().write("Invalid request");
                break;
            }
        }
        response.flushBuffer();
    }
Use Jetty as http server and handle request of get message/put message/get
offset
metamorphosis-server-wrapper/src/main/java/com/taobao/metamorphosis/http/processor/MetamorphosisOnJettyProcessor.java