Intel

Developer Zone

TimerManager

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 provided TimerClient to be called on the timer expiration.
      static TimerManager getInstance()
      A factory method that returns a single instance of TimerManager class.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, toString
    • Constructor Detail

      • TimerManager

        public TimerManager()
    • Method Detail

      • getInstance

        public static final TimerManager getInstance()
                                              throws UtilException
        A factory method that returns a single instance of TimerManager 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 provided TimerClient 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 - the TimerClient to be invoked on timer expiration
        Returns:
        Timer timer object for further start, stop and destroy operations
        Throws:
        IllegalParameterException - exception when method parameters are illegal
        UtilException