Class Script.Callable

java.lang.Object
org.apache.commons.jexl3.internal.Script.Callable
All Implemented Interfaces:
Callable<Object>
Enclosing class:
Script

public class Script.Callable extends Object implements Callable<Object>
Implements the Future and Callable interfaces to help delegation.
  • Field Details

    • interpreter

      protected final Interpreter interpreter
      The actual interpreter.
    • result

      protected volatile Object result
      Use interpreter as marker for not having run.
  • Constructor Details

    • Callable

      protected Callable(Interpreter intrprtr)
      The base constructor.
      Parameters:
      intrprtr - the interpreter to use
  • Method Details

    • call

      public Object call() throws Exception
      Specified by:
      call in interface Callable<Object>
      Throws:
      Exception
    • cancel

      public boolean cancel()
      Soft cancel the execution.
      Returns:
      true if cancel was successful, false otherwise
    • interpret

      protected Object interpret()
      Run the interpreter.
      Returns:
      the evaluation result
    • isCancellable

      public boolean isCancellable()
      Returns:
      true if interruption will throw a JexlException.Cancel, false otherwise
    • isCancelled

      public boolean isCancelled()
      Returns:
      true if evaluation was cancelled, false otherwise