|
Log4j 1.3alpha-3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.rule.AbstractRule | +--org.apache.log4j.chainsaw.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(LoggingEvent e)
Returns true if this implementation of the rule accepts the LoggingEvent, or false if not. |
Rule |
getExclusionRule()
|
Rule |
getInclusionRule()
|
Rule |
getLoggerRule()
|
Rule |
getRefinementRule()
|
void |
setExclusionRule(Rule r)
Sets the Exclusion rule to be used, and fires a PropertyChangeEvent to listeners. |
void |
setInclusionRule(Rule r)
Sets the Inclusion rule to be used, and fires a PropertyChangeEvent to listeners |
void |
setLoggerRule(Rule r)
|
void |
setRefinementRule(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(LoggingEvent e)
Rule
evaluate
in interface Rule
e
- LoggingEvent this instance will evaluate
public void setInclusionRule(Rule r)
r
- public void setRefinementRule(Rule r)
r
- public void setLoggerRule(Rule r)
public void setExclusionRule(Rule r)
r
- public final Rule getExclusionRule()
public final Rule getInclusionRule()
public final Rule getLoggerRule()
public final Rule getRefinementRule()
|
Log4j 1.3alpha-3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |