Package io.netty.util
Interface TimerTask
-
public interface TimerTaskA task which is executed after the delay specified withTimer.newTimeout(TimerTask, long, TimeUnit).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidcancelled(Timeout timeout)Called forTimerTasks that are successfully canceled viaTimeout.cancel().voidrun(Timeout timeout)Executed after the delay specified withTimer.newTimeout(TimerTask, long, TimeUnit).
-
-
-
Method Detail
-
run
void run(Timeout timeout) throws java.lang.Exception
Executed after the delay specified withTimer.newTimeout(TimerTask, long, TimeUnit).- Parameters:
timeout- a handle which is associated with this task- Throws:
java.lang.Exception
-
cancelled
default void cancelled(Timeout timeout)
Called forTimerTasks that are successfully canceled viaTimeout.cancel(). Overriding this method allows to for example run some cleanup.- Parameters:
timeout- a handle which is associated with this task
-
-