public AsyncPushConsumer get(final HttpRequest request) { Args.notNull(request, "Request"); final URIAuthority authority = request.getAuthority(); final String key = authority != null ? authority.getHostName().toLowerCase(Locale.ROOT) : null; final UriPatternMatcher<Supplier<AsyncPushConsumer>> patternMatcher = getPatternMatcher(key); if (patternMatcher == null) { return null; } String path = request.getPath(); final int i = path.indexOf('?'); if (i != -1) { path = path.substring(0, i); } final Supplier<AsyncPushConsumer> supplier = patternMatcher.lookup(path); return supplier != null ? supplier.get() : null; }