Class TrieBasedPathResourceRegistry<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:

    public class TrieBasedPathResourceRegistry<T>
    extends java.lang.Object
    implements PathResourceRegistry<T>
    This class implements a generic trie-based lookup tree. One feature in this implementation is to support wildcard match, right now, it only supports '*' to match any paths. You can register the following path patterns, which can be associate w/o wildcard: /a/b\/*\/* => resource1 /a/b\/* => resource2 /a/b/c => resource3 You will get following results when do lookup: /a/b/c/d => resource1 /a/b/ccc/eee => resource1 /a/b/c => resource3 /a/b/d => resource2 /aa/ => null The operations support here: 1. Register paths w/o wildcard associated with resources; 2. Unregister paths; 3. Lookup/Match, by default it enables wildcard matching logic; 3.1 Exact match is preferable to wildcard match for a given path; 3.2 '*' is used to match any single level path;
    • Constructor Detail

      • TrieBasedPathResourceRegistry

        public TrieBasedPathResourceRegistry()