@Override public void handle(final Request req, final Response rsp, final Route.Chain chain) throws Throwable { String path = req.path(); for (Route.Definition router : routes) { // ignore glob route if (!router.glob()) { Optional<Route> ifRoute = router .matches(Route.GET, path, MediaType.all, MediaType.ALL); if (ifRoute.isPresent()) { // route found rsp.length(0); ((RouteImpl) ifRoute.get()).handle(req, rsp, chain); return; } } } // not handled, just call next chain.next(req, rsp); } }
@Override public void handle(final Request req, final Response rsp, final Route.Chain chain) throws Throwable { String path = req.path(); for (Route.Definition router : routes) { // ignore glob route if (!router.glob()) { Optional<Route> ifRoute = router .matches(Route.GET, path, MediaType.all, MediaType.ALL); if (ifRoute.isPresent()) { // route found rsp.length(0); ((RouteImpl) ifRoute.get()).handle(req, rsp, chain); return; } } } // not handled, just call next chain.next(req, rsp); } }
@Override public boolean glob() { return route.glob(); }
@Override public boolean glob() { return route.glob(); }