Class PathFilterMiddleware

    • Constructor Detail

      • PathFilterMiddleware

        public PathFilterMiddleware​(java.util.function.Predicate<java.lang.String> pathFilter,
                                    Middleware delegated)
        Constructs a new PathFilterMiddleware with the specified pathFilter and delegated Middleware.
        Parameters:
        pathFilter - a Predicate filters the HTTP path
        delegated - the delegated Middleware
    • Method Detail

      • toFilter

        public static final java.util.function.Predicate<java.lang.String> toFilter​(java.lang.String... pathPrefixes)
        Convert path prefixes to path filter.
        Parameters:
        pathPrefixes - the prefixes of HTTP paths
        Returns:
        a Predicate<String>