Class AfterEveryMediator
java.lang.Object
ch.nolix.base.programcontrol.flowcontrol.AfterEveryMediator
- All Implemented Interfaces:
IAfterEveryMediator
A
AfterEveryMediator is not mutable.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidLets the currentIAfterEveryMediatorrun the given job.runInBackground(Runnable job) Lets the currentIAfterEveryMediatorrun the given job asynchronously in the background.static AfterEveryMediatorwithConditionAndTimeIntervalInMilliSeconds(BooleanSupplier condition, int timeIntervalInMilliseconds)
-
Method Details
-
withConditionAndTimeIntervalInMilliSeconds
public static AfterEveryMediator withConditionAndTimeIntervalInMilliSeconds(BooleanSupplier condition, int timeIntervalInMilliseconds) - Parameters:
condition-timeIntervalInMilliseconds-- Returns:
- a new
AfterEveryMediatorwith the given condition and timeIntervalInMilliseconds. - Throws:
RuntimeException- if the given condition is null.RuntimeException- if the given timeIntervalInMilliseconds is negative.
-
run
Lets the currentIAfterEveryMediatorrun the given job.- Specified by:
runin interfaceIAfterEveryMediator- Parameters:
job-
-
runInBackground
Lets the currentIAfterEveryMediatorrun the given job asynchronously in the background.- Specified by:
runInBackgroundin interfaceIAfterEveryMediator- Parameters:
job-- Returns:
- a new
IFuture.
-