use of org.forgerock.json.resource.Request in project OpenAM by OpenRock.
the class SmsRequestHandler method addRoute.
private Map<SmsRouteTree, Set<RouteMatcher<Request>>> addRoute(ServiceSchema schema, RoutingMode mode, String path, RequestHandler handler, List<Pattern> ignoredRoutes, SmsRouteTree routeTree) {
for (Pattern ignored : ignoredRoutes) {
if (ignored.matcher(path).matches()) {
return emptyMap();
}
}
SmsRouteTree tree = routeTree == null ? this.routeTree.handles(schema.getServiceName()) : routeTree;
RouteMatcher<Request> route = tree.addRoute(mode, path, handler);
return Maps.newHashMap(Collections.singletonMap(tree, asSet(route)));
}
Aggregations