if (jerseyContainer != null) {
jersey.setUrlPattern(jerseyRootPath);
jersey.register(new JacksonMessageBodyProvider(objectMapper, validator));
handler.addServlet(new NonblockingServletHolder(jerseyContainer), jersey.getUrlPattern());
}
final InstrumentedHandler instrumented = new InstrumentedHandler(metricRegistry);
instrumented.setServer(server);
instrumented.setHandler(handler);
return instrumented;
}