Class BotRule
java.lang.Object
org.frontcache.bots.BotRule
One classification rule from conf/bots.conf: name | condition | verdict [| dry-run].
The verdict is a CLIENT TYPE -
bot or guest, nothing else. It is not a judgement
about the client: it selects a behaviour profile (which branch of a WebResponse's expireTimeMap
applies, so a different TTL or a cached response vs. an origin call, and whether an
<fc:include client="..."> fragment is resolved). Guard rules can read it back through
their client-type: predicate, but that is one consumer among several, not the purpose.
Deliberately shaped like GuardRule, hit counter included: an
operator who has read the Guard Rules screen should need no second explanation for this one.-
Constructor Summary
ConstructorsConstructorDescriptionBotRule(String name, List<GuardPredicate> predicates, String clientType, boolean dryRun) -
Method Summary
-
Constructor Details
-
BotRule
-
-
Method Details
-
matches
- Returns:
- true when EVERY predicate holds (predicates are AND-ed, evaluation short-circuits)
-
getName
-
getPredicates
-
getClientType
botorguest -
isDryRun
public boolean isDryRun() -
getHits
public long getHits() -
countHit
public void countHit() -
getCondition
-
toEntry
- Returns:
- flat, JSON-friendly snapshot of this rule for the management API and the console
-
toString
-