|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log4j.rule.AbstractRule
org.apache.log4j.chainsaw.RuleMediator
public class RuleMediator
A mediator class that implements the Rule interface, by combining several optional rules used by Chainsaw's filtering GUI's into a single Rule.
This class is based upon the concept of Inclusion, Exclusion and Refinement. By default, this class accepts all events by returning true as part of the Rule interface, unless the Inclusion/Exclusion/Refinement sub-rules have been configured.
The sub-rules are queried in this order: Inclusion, Refinement, Exclusion. If any are null, that particular sub-rule is not queried. If any of the sub-rules returns false, this mediator returns false immediately, otherwise they are queried in that order to ensure the overall rule evaluates.
Setting the individual sub-rules propagates a PropertyChangeEvent as per standard Java beans principles.
| Constructor Summary | |
|---|---|
RuleMediator()
|
|
| Method Summary | |
|---|---|
boolean |
evaluate(org.apache.log4j.spi.LoggingEvent e)
|
org.apache.log4j.rule.Rule |
getExclusionRule()
|
org.apache.log4j.rule.Rule |
getInclusionRule()
|
org.apache.log4j.rule.Rule |
getLoggerRule()
|
org.apache.log4j.rule.Rule |
getRefinementRule()
|
void |
setExclusionRule(org.apache.log4j.rule.Rule r)
Sets the Exclusion rule to be used, and fires a PropertyChangeEvent to listeners. |
void |
setInclusionRule(org.apache.log4j.rule.Rule r)
Sets the Inclusion rule to be used, and fires a PropertyChangeEvent to listeners |
void |
setLoggerRule(org.apache.log4j.rule.Rule r)
|
void |
setRefinementRule(org.apache.log4j.rule.Rule r)
Sets the Refinement rule to be used, and fires a PropertyChangeEvent to listeners |
| Methods inherited from class org.apache.log4j.rule.AbstractRule |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.log4j.rule.Rule |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public RuleMediator()
| Method Detail |
|---|
public boolean evaluate(org.apache.log4j.spi.LoggingEvent e)
evaluate in interface org.apache.log4j.rule.Rulepublic void setInclusionRule(org.apache.log4j.rule.Rule r)
r - public void setRefinementRule(org.apache.log4j.rule.Rule r)
r - public void setLoggerRule(org.apache.log4j.rule.Rule r)
public void setExclusionRule(org.apache.log4j.rule.Rule r)
r - public final org.apache.log4j.rule.Rule getExclusionRule()
public final org.apache.log4j.rule.Rule getInclusionRule()
public final org.apache.log4j.rule.Rule getLoggerRule()
public final org.apache.log4j.rule.Rule getRefinementRule()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||