Class LocalHostMatcher

  • All Implemented Interfaces:
    ConfigurationObject, URIMatcher

    public class LocalHostMatcher
    extends InetHostMatcher
    Allows to check that a given URL is served by one of the local network interface or one of its aliases.

    Example 1: Accept any localhost url

    
         - localMatch {}
     

    Example 2: Accept any localhost url (port == -1 accepts any port)

    
         - localMatch
           port: -1
     

    Example 3: Accept any localhost url on port 80 only

    
         - localMatch
           port: 80
     

    Example 4: Accept localhost urls with paths that start with /print/.

    If the regular expression given does not start with / then it will be added because all paths start with /.

    
         - localMatch
           pathRegex: /print/.+
     
    [[examples=http_processors]]
    • Constructor Detail

      • LocalHostMatcher

        public LocalHostMatcher()
    • Method Detail

      • validate

        public final void validate​(java.util.List<java.lang.Throwable> validationErrors,
                                   Configuration configuration)
        Description copied from interface: ConfigurationObject
        validate that the configuration was correct.
        Parameters:
        validationErrors - a list to add any detected errors to.
        configuration - the containing configuration
      • toString

        public final java.lang.String toString()
        Specified by:
        toString in class HostMatcher