class CustomHttpResponseHandler {

    public boolean handle(HttpServerRequest request) {
        if (!request.uri().startsWith(path)) {
            return false;
        }
        HttpResponseStatus rs;
        String info = "";
        try {
            String code = request.uri().substring(path.length());

            // remove leading slashes
            while (code.startsWith(SLASH)) {
                code = code.substring(1);
            }

            // find additional path segments
            int index = code.indexOf(SLASH);
            if(index != -1) {
                code = code.substring(0, index); // remove additional path segments
            }

            int codeAsInt = Integer.parseInt(code);
            rs = HttpResponseStatus.valueOf(codeAsInt);
        } catch (Exception ex) {
            LOG.warn("can't parse wanted response code from {}", request.uri(), ex);
            rs = HttpResponseStatus.BAD_REQUEST;
            info = ": missing, wrong or non-numeric status-code in request URL";
        }
        request.response().setStatusCode(rs.code()).setStatusMessage(rs.reasonPhrase()).end(rs.toString() + info);
        return true;
    }

    public  CustomHttpResponseHandler(String rootPath);

}