@Override
    public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) {
        final RequestHeaders headers = req.headers();
        final long contentLength = headers.contentLength();
        if (contentLength >= -1 && contentLength <= maxRequestBufferSize) {
            // aggregate bounded requests
            return HttpResponse.of(req.aggregate().thenCompose(r -> serveAsync(ctx, r)));
        } else {
            return HttpResponse.of(serveAsync(ctx, req));
        }
    }
Registers {@link ResteasyService} with Armeria {@link ServerBuilder}.
resteasy/src/main/java/com/linecorp/armeria/server/resteasy/ResteasyService.java