Class JaninoEventEvaluatorBase<E>

Type Parameters:
E - event type
All Implemented Interfaces:
EventEvaluator<E>, ContextAware, LifeCycle

public abstract class JaninoEventEvaluatorBase<E> extends EventEvaluatorBase<E>
Abstract class which sets the groundwork for janino based evaluations.
Author:
Ceki Gülcü
  • Field Details

  • Constructor Details

    • JaninoEventEvaluatorBase

      public JaninoEventEvaluatorBase()
  • Method Details

    • getDecoratedExpression

      protected abstract String getDecoratedExpression()
    • getParameterNames

      protected abstract String[] getParameterNames()
    • getParameterTypes

      protected abstract Class<?>[] getParameterTypes()
    • getParameterValues

      protected abstract Object[] getParameterValues(E event)
    • start

      public void start()
      Specified by:
      start in interface LifeCycle
      Overrides:
      start in class EventEvaluatorBase<E>
    • evaluate

      public boolean evaluate(E event) throws EvaluationException
      Description copied from interface: EventEvaluator
      Evaluates whether the event passed as parameter matches some user-specified criteria.

      The Evaluator 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:
      EvaluationException - may be thrown during faulty evaluation
    • getExpression

      public String getExpression()
    • setExpression

      public void setExpression(String expression)
    • addMatcher

      public void addMatcher(Matcher matcher)
    • getMatcherList

      public List<Matcher> getMatcherList()