Iterator<MethodHandlers> getAllHandlers(final RestRequest request) { // Between retrieving the correct path, we need to reset the parameters, // otherwise parameters are parsed out of the URI that aren't actually handled. final Map<String, String> originalParams = new HashMap<>(request.params()); return handlers.retrieveAll(getPath(request), () -> { // PathTrie modifies the request, so reset the params between each iteration request.params().clear(); request.params().putAll(originalParams); return request.params(); }); }
Iterator<MethodHandlers> getAllHandlers(final RestRequest request) { // Between retrieving the correct path, we need to reset the parameters, // otherwise parameters are parsed out of the URI that aren't actually handled. final Map<String, String> originalParams = new HashMap<>(request.params()); return handlers.retrieveAll(getPath(request), () -> { // PathTrie modifies the request, so reset the params between each iteration request.params().clear(); request.params().putAll(originalParams); return request.params(); }); }
Iterator<MethodHandlers> getAllHandlers(final RestRequest request) { // Between retrieving the correct path, we need to reset the parameters, // otherwise parameters are parsed out of the URI that aren't actually handled. final Map<String, String> originalParams = new HashMap<>(request.params()); return handlers.retrieveAll(getPath(request), () -> { // PathTrie modifies the request, so reset the params between each iteration request.params().clear(); request.params().putAll(originalParams); return request.params(); }); }
private RestHandler getHandler(RestRequest request) { String path = getPath(request); PathTrie<RestHandler> handlers = getHandlersForMethod(request.method()); if (handlers != null) { return handlers.retrieve(path, request.params()); } else { return null; } }
private RestHandler getHandler(RestRequest request) { String path = getPath(request); PathTrie<RestHandler> handlers = getHandlersForMethod(request.method()); if (handlers != null) { return handlers.retrieve(path, request.params()); } else { return null; } }