com.intel.util
Class TimerManager
- java.lang.Object
-
- com.intel.util.TimerManager
-
public abstract class TimerManager extends java.lang.Object
This class allows timers creation and management.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description class
TimerManager.Timer
This class describes a single timer object and allows to start, stop and destroy the timer.
-
Constructor Summary
Constructors Constructor and Description TimerManager()
-
Method Summary
Methods Modifier and Type Method and Description abstract TimerManager.Timer
createTimer(TimerClient client)
Creates a timer object and registers the providedTimerClient
to be called on the timer expiration.static TimerManager
getInstance()
A factory method that returns a single instance ofTimerManager
class.
-
-
-
Method Detail
-
getInstance
public static final TimerManager getInstance() throws UtilException
A factory method that returns a single instance ofTimerManager
class.- Returns:
- A single
TimerManager
instance. - Throws:
AccessDeniedException
- if the service does not have sufficient permissions to register to this event reason.UtilException
-
createTimer
public abstract TimerManager.Timer createTimer(TimerClient client) throws UtilException
Creates a timer object and registers the providedTimerClient
to be called on the timer expiration. Timer should be destroyed using destroy() method at the end of the use. Pay attention that once timer is destroyed it can not be used and will generate NotInitializedException on each method call. TimerClient must be none null value or IllegalParameterException will be thrown.- Parameters:
client
- theTimerClient
to be invoked on timer expiration- Returns:
- Timer timer object for further start, stop and destroy operations
- Throws:
IllegalParameterException
- exception when method parameters are illegalUtilException
-
-