Class IpListConfiguration

java.lang.Object
de.gustavblass.nginx.ipguard4j.configuration.IpListConfiguration

public class IpListConfiguration extends Object
Represents a collection of IP-address lists sharing a common format.
  • Field Details

    • listUris

      @NonNull private @NonNull Set<URI> listUris
      The actual URIs pointing to the IP-address lists. They all share the same format (if any), with one IP address per line.
    • format

      @Nullable private @Nullable String format

      The format of the IP-address lists. If none is specified, it is assumed that the IP addresses are present in plain text.

      Allowed values:

  • Constructor Details

    • IpListConfiguration

      public IpListConfiguration()
  • Method Details

    • getListUris

      @Contract(pure=true, value="-> new") @NonNull public @NonNull HashSet<URI> getListUris()
      Returns:
      A shallow copy of the listUris.
    • getFormat

      @Contract(pure=true, value="-> new") @NonNull public @NonNull Optional<String> getFormat()
      Returns:
      The format, if any.
    • setListUris

      @Contract(mutates="this") public void setListUris(@NonNull @NonNull Collection<URI> listUris)
      Updates the listUris.
      Parameters:
      listUris - The new list of source URIs.
    • setFormat

      @Contract(mutates="this") public void setFormat(@NonNull @NonNull String format)
      Updates the format.
      Parameters:
      format - The new format of the IP-address lists. Must adhere to the description in format for later, when the actual parser is created.