Interface WithTiming
- All Superinterfaces:
io.vertx.core.Verticle
public interface WithTiming
extends io.vertx.core.Verticle
Allows
Verticle
instances to get simplified access to the Vert.x timing functions
like setPeriodic
or setTimer
.
Usage
public class MyVerticle extends TelestionVerticle<GenericConfiguration> implements WithTiming {
@Override
public void onStart() {
var delay = Duration.ofSeconds(1);
interval(delay, id -> logger.info("Ping!"));
}
}
-
Method Summary
Modifier and TypeMethodDescriptiondefault Timing
LikesetPeriodic
, but returns a special handler which cancels the interval when called.default Timing
Likeinterval(long, Handler)
, but accepts aDuration
.default io.vertx.core.TimeoutStream
intervalStream(long delay)
default io.vertx.core.TimeoutStream
intervalStream(Duration delay)
LikeintervalStream(long)
, but accepts aDuration
.default Timing
LikesetTimer
, but returns a special handler which cancels the timeout when called.default Timing
Liketimeout(long, Handler)
, but accepts aDuration
.default io.vertx.core.TimeoutStream
timeoutStream(long delay)
default io.vertx.core.TimeoutStream
timeoutStream(Duration delay)
LiketimeoutStream(long)
, but accepts aDuration
.Methods inherited from interface io.vertx.core.Verticle
getVertx, init, start, stop
-
Method Details
-
interval
LikesetPeriodic
, but returns a special handler which cancels the interval when called.- Returns:
- a handler which cancels the interval when called
-
interval
Likeinterval(long, Handler)
, but accepts aDuration
. -
intervalStream
default io.vertx.core.TimeoutStream intervalStream(long delay)- See Also:
Vertx.periodicStream(long)
-
intervalStream
LikeintervalStream(long)
, but accepts aDuration
. -
timeout
LikesetTimer
, but returns a special handler which cancels the timeout when called.- Returns:
- a handler which cancels the timeout when called
-
timeout
Liketimeout(long, Handler)
, but accepts aDuration
. -
timeoutStream
default io.vertx.core.TimeoutStream timeoutStream(long delay)- See Also:
Vertx.timerStream(long)
-
timeoutStream
LiketimeoutStream(long)
, but accepts aDuration
.
-