server.setReceiveBufferSize(receiveBufferSize);
}
// Set request handler, use route matcher if a route handler is provided.
if (routeMatcherHandler == null) {
server.requestHandler(jerseyHandler);
} else {
RouteMatcher rm = new RouteMatcher();
String pattern = jerseyHandler.getBaseUri().getPath() + "*";
rm.all(pattern, jerseyHandler);
routeMatcherHandler.handle(rm);