private List<RouteEntry> findTargetsForRequestedRoute(HttpMethod httpMethod, String path) { List<RouteEntry> matchSet = new ArrayList<RouteEntry>(); for (RouteEntry entry : routes) { if (entry.matches(httpMethod, path)) { matchSet.add(entry); } } return matchSet; }
@Override public RouteMatch findTargetForRequestedRoute(HttpMethod httpMethod, String path) { for (RouteEntry entry : routes) { if (entry.matches(httpMethod, path)) { return new RouteMatch(httpMethod, entry.target, entry.path, path); } } return null; }
@Override public List<RouteMatch> findTargetsForRequestedRoute(HttpMethod httpMethod, String path) { List<RouteMatch> matchSet = new ArrayList<RouteMatch>(); for (RouteEntry entry : routes) { if (entry.matches(httpMethod, path)) { matchSet.add(new RouteMatch(httpMethod, entry.target, entry.path, path)); } } return matchSet; }