Package ch.qos.logback.core.boolex
Class JaninoEventEvaluatorBase<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.boolex.EventEvaluatorBase<E>
-
- ch.qos.logback.core.boolex.JaninoEventEvaluatorBase<E>
-
- Type Parameters:
E-
- All Implemented Interfaces:
EventEvaluator<E>,ContextAware,LifeCycle
- Direct Known Subclasses:
JaninoEventEvaluator,JaninoEventEvaluator
public abstract class JaninoEventEvaluatorBase<E> extends EventEvaluatorBase<E>
Abstract class which sets the groundwork for janino based evaluations.- Author:
- Ceki Gülcü
-
-
Field Summary
Fields Modifier and Type Field Description static intERROR_THRESHOLDprotected java.util.List<Matcher>matcherList-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description JaninoEventEvaluatorBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddMatcher(Matcher matcher)booleanevaluate(E event)Evaluates whether the event passed as parameter matches some user-specified criteria.protected abstract java.lang.StringgetDecoratedExpression()java.lang.StringgetExpression()java.util.List<Matcher>getMatcherList()protected abstract java.lang.String[]getParameterNames()protected abstract java.lang.Class<?>[]getParameterTypes()protected abstract java.lang.Object[]getParameterValues(E event)voidsetExpression(java.lang.String expression)voidstart()-
Methods inherited from class ch.qos.logback.core.boolex.EventEvaluatorBase
getName, isStarted, setName, stop
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Field Detail
-
ERROR_THRESHOLD
public static final int ERROR_THRESHOLD
- See Also:
- Constant Field Values
-
matcherList
protected java.util.List<Matcher> matcherList
-
-
Method Detail
-
getDecoratedExpression
protected abstract java.lang.String getDecoratedExpression()
-
getParameterNames
protected abstract java.lang.String[] getParameterNames()
-
getParameterTypes
protected abstract java.lang.Class<?>[] getParameterTypes()
-
getParameterValues
protected abstract java.lang.Object[] getParameterValues(E event)
-
start
public void start()
- Specified by:
startin interfaceLifeCycle- Overrides:
startin classEventEvaluatorBase<E>
-
evaluate
public boolean evaluate(E event) throws EvaluationException
Description copied from interface:EventEvaluatorEvaluates 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:
EvaluationException- may be thrown during faulty evaluation
-
getExpression
public java.lang.String getExpression()
-
setExpression
public void setExpression(java.lang.String expression)
-
addMatcher
public void addMatcher(Matcher matcher)
-
getMatcherList
public java.util.List<Matcher> getMatcherList()
-
-