Class MapRemote.Builder

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

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

    • add

      public MapRemote.Builder add(String spec)
      Adds a rule from a spec.
      Parameters:
      spec - a spec of the form [|flow-filter]|url-regex|replacement
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the spec is invalid
    • add

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

      public MapRemote.Builder maxBodySize(int bytes)
      Largest request body buffered for filters that look at it (~bq); default 10 MiB. A larger body is answered with 413, as for any filter that buffers requests.
      Parameters:
      bytes - the buffer limit in bytes
      Returns:
      this builder
    • build

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