Class ResourceMatchers


  • public final class ResourceMatchers
    extends Object
    Factory for common IResourceMatchers. Each resource matcher must be thread-safe and immutable.
    Since:
    7.0.10
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • ResourceMatchers

        public ResourceMatchers()
    • Method Detail

      • always

        public static IResourceMatcher always()
        Returns:
        A resource matcher that matches any URL or URI.
      • matchingScheme

        public static IResourceMatcher matchingScheme​(String scheme)
        Returns a resource matcher that matches a URI by its scheme or an URL by its protocol. The scheme must be identical, but the comparison is made case-insensitive since in practive file:// is usually treated the same as FILE://. A null resource never matches.
        Parameters:
        scheme - Scheme to match.
        Returns:
        A resource matcher that matches when the protocol of a URL or the scheme of a URI matches the given scheme exactly (case-insensitive).
      • never

        public static IResourceMatcher never()
        Returns:
        A resource matcher that never matches any URL or URI.