Log4j 1.3alpha-1

org.apache.log4j.rule
Interface Rule

All Known Implementing Classes:
AbstractRule, RuleMediator

public interface Rule

A Rule evaluates to true of false given a LoggingEvent object, and can notify listeners when the underlying implementation of this Rule has it's criteria changed by using the standard PropertyChangeListener infrastructure.

Author:
Paul Smith , Scott Deboy

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener to this instance, which is notified when underlying Rule information has changed.
 boolean evaluate(LoggingEvent e)
          Returns true if this implementation of the rule accepts the LoggingEvent, or false if not.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a known PropertyChangeListener from this Rule.
 

Method Detail

evaluate

public boolean evaluate(LoggingEvent e)
Returns true if this implementation of the rule accepts the LoggingEvent, or false if not. What True/False means can be client-specific.

Parameters:
e - LoggingEvent this instance will evaluate
Returns:
true if this Rule instance accepts the event, otherwise false.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to this instance, which is notified when underlying Rule information has changed. (there are no specific property name events).

Parameters:
l -

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a known PropertyChangeListener from this Rule.

Parameters:
l -

Log4j 1.3alpha-1

Copyright 2000-2003 Apache Software Foundation.