Class UriMatchers


  • public final class UriMatchers
    extends java.lang.Object
    Hold a list of URIMatcher and implement the logic to see if any matches an URI.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(java.net.URI uri, org.springframework.http.HttpMethod httpMethod)  
      boolean matches​(MatchInfo matchInfo)  
      void setMatchers​(java.util.List<? extends URIMatcher> matchers)
      Set the matchers.
      void validate​(java.util.List<java.lang.Throwable> validationErrors)
      Validate the configuration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UriMatchers

        public UriMatchers()
        Constructor.
      • UriMatchers

        public UriMatchers​(java.util.List<? extends URIMatcher> matchers)
        Constructor.
        Parameters:
        matchers - the list
    • Method Detail

      • setMatchers

        public void setMatchers​(java.util.List<? extends URIMatcher> matchers)
        Set the matchers.
        Parameters:
        matchers - the new list.
      • matches

        public boolean matches​(java.net.URI uri,
                               org.springframework.http.HttpMethod httpMethod)
                        throws java.net.SocketException,
                               java.net.UnknownHostException,
                               java.net.MalformedURLException
        Parameters:
        uri - the URI to create a request for
        httpMethod - the HTTP method to execute
        Returns:
        true if it's matching.
        Throws:
        java.net.SocketException
        java.net.UnknownHostException
        java.net.MalformedURLException
      • matches

        public boolean matches​(MatchInfo matchInfo)
                        throws java.net.SocketException,
                               java.net.UnknownHostException,
                               java.net.MalformedURLException
        Parameters:
        matchInfo - The info to check for matches.
        Returns:
        true if it's matching.
        Throws:
        java.net.SocketException
        java.net.UnknownHostException
        java.net.MalformedURLException
      • validate

        public void validate​(java.util.List<java.lang.Throwable> validationErrors)
        Validate the configuration.
        Parameters:
        validationErrors - where to put the errors.