Package com.iizix.timeout.engine
Class TimerEngine
java.lang.Object
com.iizix.timeout.engine.TimerEngine
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 SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static ITimerEngineGets the single instance of the timeout engine.- static ITimerEngineCreates a new engine for use in e.g.
- Constructor Details- TimerEnginepublic TimerEngine()
 
- Method Details- getSystemInstanceGets the single instance of the timeout engine.
- newInstanceCreates a new engine for use in e.g. an application or client session.- Returns:
- The new engine. Dispose it after use.
- Throws:
- IllegalStateException- If the system instance is disposed of.