Class IPFilter

java.lang.Object
org.jppf.comm.discovery.IPFilter

public class IPFilter extends Object
Instances of this class handle IP address inclusion and exclusion filters constructed from the JPPF configuration.
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • IPFilter

      public IPFilter(TypedProperties config)
      Initialize this filter with the specified configuration.
      Parameters:
      config - the configuration from which to get the include and exclude filters.
    • IPFilter

      public IPFilter(TypedProperties config, boolean broadcaster)
      Initialize this filter with the specified configuration.
      Parameters:
      config - the configuration from which to get the include and exclude filters.
      broadcaster - specifies whether this filter applies to the driver's broadcaster or to a client's/node's receiver.
    • IPFilter

      public IPFilter(TypedProperties config, String prefix)
      Initialize this filter with the specified configuration.
      Parameters:
      config - the configuration from which to get the include and exclude filters.
      prefix - the confiugration properties prefix to use.
  • Method Details

    • configure

      public void configure()
      Configure this IP filter from the JPPF configuration.
    • configure

      public void configure(String prefix)
      Configure this IP filter from the JPPF configuration.
      Parameters:
      prefix - the confiugration properties prefix to use.
    • isAddressAccepted

      public boolean isAddressAccepted(InetAddress ip)
      Determine whether an ip address passes the include and exclude filters.
      Parameters:
      ip - the ip to check.
      Returns:
      true if the address passes the filters, false otherwise.
    • hasPattern

      public boolean hasPattern()
      Returns:
      whether there is at least one pattern.