Interface TimeoutScheduler.TimeoutEventListener

Enclosing class:
TimeoutScheduler

public static interface TimeoutScheduler.TimeoutEventListener
Listener on timeout events.

The task must register itself with a TimeoutScheduler using TimeoutScheduler.scheduleAtFixedRate(TimeoutEventListener) method to be called back with checkForTimeout(long) method.

The task must de-register itself using TimeoutScheduler.removeScheduledTask(TimeoutEventListener) to stop being called back.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkForTimeout(long currentTime)
    Check whether or not an operation timed-out.
  • Method Details

    • checkForTimeout

      boolean checkForTimeout(long currentTime)
      Check whether or not an operation timed-out.
      Parameters:
      currentTime - Time to use as current time for any check.
      Returns:
      true to be invoked again after a period of time, false to de-register this task so that it is never invoked again.