@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError( "Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError( "Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError("Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError( "Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError("Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError("Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; scriptEvaluator = new ScriptEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS); super.start(); } catch (Exception e) { addError( "Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) scriptEvaluator.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }
@Override public void start() { try { assert context != null; ClassLoader cl = context.getClass().getClassLoader(); ee = new ExpressionEvaluator(getDecoratedExpression(), EXPRESSION_TYPE, getParameterNames(), getParameterTypes(), THROWN_EXCEPTIONS, cl); super.start(); } catch (Exception e) { addError( "Could not start evaluator with expression [" + expression + "]", e); } }
public boolean evaluate(E event) throws EvaluationException { if (!isStarted()) { throw new IllegalStateException("Evaluator [" + name + "] was called in stopped state"); } try { Boolean result = (Boolean) ee.evaluate(getParameterValues(event)); return result.booleanValue(); } catch (Exception ex) { errorCount++; if (errorCount >= ERROR_THRESHOLD) { stop(); } throw new EvaluationException("Evaluator [" + name + "] caused an exception", ex); } }