Logback API
Version 0.9.8

ch.qos.logback.core.boolex
Interface EventEvaluator

All Superinterfaces:
ContextAware, LifeCycle
All Known Implementing Classes:
JaninoEventEvaluator, JaninoEventEvaluator, JaninoEventEvaluatorBase, URLEvaluator

public interface EventEvaluator
extends ContextAware, LifeCycle

An EventEvaluator has the responsibility to evaluate whether a given an event matches a given 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
 boolean evaluate(Object event)
          Evaluates whether the event passed as parameter matches this evaluator's matching criteria.
 String getName()
          Evaluators are named entities.
 void setName(String name)
          Evaluators are named entities.
 
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
 
Methods inherited from interface ch.qos.logback.core.spi.LifeCycle
isStarted, start, stop
 

Method Detail

evaluate

boolean evaluate(Object event)
                 throws NullPointerException,
                        EvaluationException
Evaluates whether the event passed as parameter matches this evaluator's matching criteria.

The Evaluator instance is 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 values
EvaluationException - Thrown during evaluation

getName

String getName()
Evaluators are named entities.

Returns:
The name of this evaluator.

setName

void setName(String name)
Evaluators are named entities.


Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.