Class BlockList.Builder

java.lang.Object
org.microproxy.extras.BlockList.Builder
Enclosing class:
BlockList

public static final class BlockList.Builder extends Object
Builds BlockList.
  • Method Details

    • add

      public BlockList.Builder add(String spec)
      Adds a rule from a spec.
      Parameters:
      spec - a spec of the form |flow-filter|status
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the spec is invalid
    • add

      public BlockList.Builder add(BlockList.Rule rule)
      Adds a rule.
      Parameters:
      rule - the rule to append
      Returns:
      this builder
    • maxBodySize

      public BlockList.Builder maxBodySize(int bytes)
      Largest request body buffered for filters that look at it (~bq); default 10 MiB.
      Parameters:
      bytes - the buffer limit in bytes
      Returns:
      this builder
    • build

      public BlockList build()
      Creates the addon.
      Returns:
      the configured addon