public RestRequestDispatcher(final String name, final Iterable<RestSetting> settings) {
this.name = eq(name);
this.getAllSettings = filterSettings(settings, RestAllSetting.class, HttpMethod.GET);
this.getSingleSettings = filterSettings(settings, RestSingleSetting.class, HttpMethod.GET);
this.postSettings = filterSettings(settings, RestAllSetting.class, HttpMethod.POST);
this.putSettings = filterSettings(settings, RestSingleSetting.class, HttpMethod.PUT);
this.deleteSettings = filterSettings(settings, RestSingleSetting.class, HttpMethod.DELETE);
this.headSettings = filterSettings(settings, RestSingleSetting.class, HttpMethod.HEAD);
this.headAllSettings = filterSettings(settings, RestAllSetting.class, HttpMethod.HEAD);
this.patchSettings = filterSettings(settings, RestSingleSetting.class, HttpMethod.PATCH);
this.subResourceSettings = filter(settings, SubResourceSetting.class);
this.allMatcher = by(uri(resourceRoot(name)));
this.singleMatcher = Moco.match(uri(join(resourceRoot(name), "[^/]*")));
}