Class TimerEngine


  • public class TimerEngine
    extends java.lang.Object
    The timer engine handles timeouts and scheduled events.

    It can be used to register a timeout for a task that runs in a thread. When timeout is reached, the method ITimeoutListener.onTimeout() is called from another thread, informing the running thread of this timeout. It is up to the running thread to take appropriate action.

    It can also handle a scheduled periodic event notification that also runs in a thread.

    Author:
    Christopher Mindus
    • Constructor Detail

      • TimerEngine

        public TimerEngine()
    • Method Detail

      • getSystemInstance

        public static ITimerEngine getSystemInstance()
        Gets the single instance of the timeout engine.
      • newInstance

        public static ITimerEngine newInstance()
        Creates a new engine for use in e.g. an application or client session.
        Returns:
        The new engine. Dispose it after use.