java.lang.Object
com.aoapps.servlet.firewall.pathspace.FirewallComponent

public class FirewallComponent extends Object
A FirewallComponent occupies one or more prefixes in the servlet path space. It also has an associated list of per-component rules. These rules are called after global rules for requests that match the prefixes.

See AO Servlet Firewall Filter. TODO: Either move this page from semanticcms-core-controller, or link to it from here.

  • Method Details

    • newInstance

      public static FirewallComponent newInstance(Iterable<? extends Prefix> prefixes, Iterable<? extends Rule> rules)
      Creates a new firewall component.
    • newInstance

      public static FirewallComponent newInstance(Iterable<? extends Prefix> prefixes, Rule... rules)
      Creates a new firewall component.
    • newInstance

      public static FirewallComponent newInstance(Prefix[] prefixes, Iterable<? extends Rule> rules)
      Creates a new firewall component.
    • newInstance

      public static FirewallComponent newInstance(Prefix[] prefixes, Rule... rules)
      Creates a new firewall component.
    • newInstance

      public static FirewallComponent newInstance(Prefix prefix, Iterable<? extends Rule> rules)
      Creates a new firewall component.
    • newInstance

      public static FirewallComponent newInstance(Prefix prefix, Rule... rules)
      Creates a new firewall component.
    • getPrefixes

      public Set<Prefix> getPrefixes()
      Gets an unmodifiable set of prefixes associated with this component.
    • getRules

      public List<Rule> getRules()
      Gets an unmodifiable copy of the rules applied to this component.
    • getRulesIterable

      public Iterable<Rule> getRulesIterable()
      Gets an unmodifiable iterator to the rules.

      Implementation Note:
      Is unmodifiable due to being implemented as CopyOnWriteArrayList.iterator().

    • prepend

      public void prepend(Iterable<? extends Rule> rules)
      Inserts rules into the beginning of this component.
    • prepend

      public void prepend(Rule... rules)
      Inserts rules into the beginning of this component.
    • append

      public void append(Iterable<? extends Rule> rules)
      Inserts rules into the end of this component.
    • append

      public void append(Rule... rules)
      Inserts rules into the end of this component.