Class WhitelistPredicate

    • Constructor Summary

      Constructors 
      Constructor Description
      WhitelistPredicate​(java.lang.String addressPattern)
      Creates a new predicate instance from the specified pattern.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAllowed​(java.lang.String host, int port)
      Tests if the given host name matches the configured pattern.
      • Methods inherited from class java.lang.Object

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

      • WhitelistPredicate

        public WhitelistPredicate​(java.lang.String addressPattern)
        Creates a new predicate instance from the specified pattern.
        Parameters:
        addressPattern - a regular expression to the the host names with
    • Method Detail

      • isAllowed

        public boolean isAllowed​(java.lang.String host,
                                 int port)
        Tests if the given host name matches the configured pattern.
        Specified by:
        isAllowed in interface ConnectionPredicate
        Parameters:
        host - the host to connect to/from
        port - the port to connect to/from
        Returns:
        true if the connection is allowed, false otherwise