-
- All Superinterfaces:
ContextAware,LifeCycle
- All Known Implementing Classes:
EventEvaluatorBase,ExceptionMatchEvaluator,OnErrorEvaluator,OnMarkerEvaluator,StubEventEvaluator
public interface EventEvaluator<E> extends ContextAware, LifeCycle
Evaluates whether a given an event matches user-specified criteria.Implementations are free to evaluate the event as they see fit. In particular, the evaluation results may depend on previous events.
- Author:
- Ceki Gülcü
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanevaluate(E event)Evaluates whether the event passed as parameter matches some user-specified criteria.StringgetName()An evaluator may optionally have a name.voidsetName(String name)An evaluator may optionally have a name.-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Method Detail
-
evaluate
boolean evaluate(E event) throws NullPointerException, EvaluationException
Evaluates whether the event passed as parameter matches some user-specified criteria.The
Evaluatoris free to evaluate the event as it pleases. In particular, the evaluation results may depend on previous events.- Parameters:
event- The event to evaluate- Returns:
- true if there is a match, false otherwise.
- Throws:
NullPointerException- can be thrown in presence of null valuesEvaluationException- may be thrown during faulty evaluation
-
getName
String getName()
An evaluator may optionally have a name.- Returns:
- The name of this evaluator.
-
-