Interface ScriptExecution


@NonNullByDefault public interface ScriptExecution
The ScriptExecution allows creating timers for asynchronous script execution
Author:
Jan N. Klug - Initial contribution
  • Method Details

    • createTimer

      Timer createTimer(ZonedDateTime zonedDateTime, Runnable closure)
      Schedules a block of code for later execution.
      Parameters:
      zonedDateTime - the point in time when the code should be executed
      closure - the code block to execute
      Returns:
      a handle to the created timer, so that it can be canceled or rescheduled
    • createTimer

      Timer createTimer(@Nullable String identifier, ZonedDateTime zonedDateTime, Runnable closure)
      Schedules a block of code for later execution.
      Parameters:
      identifier - an optional identifier
      zonedDateTime - the point in time when the code should be executed
      closure - the code block to execute
      Returns:
      a handle to the created timer, so that it can be canceled or rescheduled
    • createTimerWithArgument

      Timer createTimerWithArgument(ZonedDateTime zonedDateTime, Object arg1, Consumer<Object> closure)
      Schedules a block of code (with argument) for later execution
      Parameters:
      zonedDateTime - the point in time when the code should be executed
      arg1 - the argument to pass to the code block
      closure - the code block to execute
      Returns:
      a handle to the created timer, so that it can be canceled or rescheduled
    • createTimerWithArgument

      Timer createTimerWithArgument(@Nullable String identifier, ZonedDateTime zonedDateTime, Object arg1, Consumer<Object> closure)
      Schedules a block of code (with argument) for later execution
      Parameters:
      identifier - an optional identifier
      zonedDateTime - the point in time when the code should be executed
      arg1 - the argument to pass to the code block
      closure - the code block to execute
      Returns:
      a handle to the created timer, so that it can be canceled or rescheduled