Class MapLocal.Builder

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

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

    • add

      public MapLocal.Builder add(String spec)
      Adds a rule from a spec.
      Parameters:
      spec - a spec of the form [|flow-filter]|url-regex|file-or-directory
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the spec is invalid or its path does not exist
    • add

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

      public MapLocal.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 MapLocal build()
      Creates the addon.
      Returns:
      the configured addon