Interface ScriptExecution
@NonNullByDefault
public interface ScriptExecution
The
ScriptExecution allows creating timers for asynchronous script execution- Author:
- Jan N. Klug - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptioncreateTimer(@Nullable String identifier, ZonedDateTime zonedDateTime, Runnable closure) Schedules a block of code for later execution.createTimer(ZonedDateTime zonedDateTime, Runnable closure) Schedules a block of code for later execution.createTimerWithArgument(@Nullable String identifier, ZonedDateTime zonedDateTime, Object arg1, Consumer<Object> closure) Schedules a block of code (with argument) for later executioncreateTimerWithArgument(ZonedDateTime zonedDateTime, Object arg1, Consumer<Object> closure) Schedules a block of code (with argument) for later execution
-
Method Details
-
createTimer
Schedules a block of code for later execution.- Parameters:
zonedDateTime- the point in time when the code should be executedclosure- the code block to execute- Returns:
- a handle to the created timer, so that it can be canceled or rescheduled
-
createTimer
Schedules a block of code for later execution.- Parameters:
identifier- an optional identifierzonedDateTime- the point in time when the code should be executedclosure- the code block to execute- Returns:
- a handle to the created timer, so that it can be canceled or rescheduled
-
createTimerWithArgument
Schedules a block of code (with argument) for later execution- Parameters:
zonedDateTime- the point in time when the code should be executedarg1- the argument to pass to the code blockclosure- 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 identifierzonedDateTime- the point in time when the code should be executedarg1- the argument to pass to the code blockclosure- the code block to execute- Returns:
- a handle to the created timer, so that it can be canceled or rescheduled
-