Enum Class GuardPredicateFactory.Scope

java.lang.Object
java.lang.Enum<GuardPredicateFactory.Scope>
org.frontcache.guard.GuardPredicateFactory.Scope
All Implemented Interfaces:
Serializable, Comparable<GuardPredicateFactory.Scope>, Constable
Enclosing class:
GuardPredicateFactory

public static enum GuardPredicateFactory.Scope extends Enum<GuardPredicateFactory.Scope>
Which config file a predicate is being parsed for. The grammar is shared; two predicates are not.
  • client-type: is refused in BOTS because it is circular - classification computes the value that predicate reads.
  • rate: is refused in BOTS because it counts. Classification runs for every request including every include, before the guard rules, so metering there would spend a visitor's budget once per fragment of their page. Rate-based reactions belong in guard-rules.conf, which can read the classification back through client-type:.
  • Enum Constant Details

  • Method Details

    • values

      public static GuardPredicateFactory.Scope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GuardPredicateFactory.Scope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFile

      public String getFile()