You use the Scheduler API in the following cases:
scheduler.after( ()-> foo(), 100 )
scheduler.at( Instant.from( dateTime ) )
scheduler.schedule( ()-> foo(), 10, 20 , 40, 100 )
scheduler.schedule( () -> foo(), "10 10 10 FRI#3 JAN-JUN ?" )
CancelablePromise<Integer> cp = scheduler.before( p, 100 )
scheduler.after( C::work, 0)
Basically the API replaces the Java Timer and ScheduledExecutor while providing quite a bit more bang for the buck. It is bundle aware so that any schedules or delays are properly canceled when the bundle is stopped.
##
Implementations must follow the PID osgi.enroute.rest
which must support at least the following fields:
alias
– The primary end-point