Class TimeoutTimerTask

  • All Implemented Interfaces:
    io.netty.util.TimerTask
    Direct Known Subclasses:
    ReadTimeoutTimerTask, RequestTimeoutTimerTask

    public abstract class TimeoutTimerTask
    extends Object
    implements io.netty.util.TimerTask
    A timeout that can be armed either on a Timer or on an event loop; which one an exchange uses is AsyncHttpClientConfig.isUseEventLoopTimeouts(). An event loop schedules Runnables, so each subclass implements that as a second entry point into the same body. This class stays a TimerTask alone: Runnable#run declares no checked exception, so a run() here would have to catch what TimerTask.run(Timeout) declares and no subclass throws.
    • Method Detail

      • clean

        public void clean()
        When the timeout is cancelled, it could still be referenced for quite some time in the Timer. Holding a reference to the future might mean holding a reference to the channel, and heavy objects such as SslEngines