Class MinuteTimer


  • public class MinuteTimer
    extends java.lang.Object
    Executes subscriber every full Minute. Starts and stops itself, depending on whether subscribers are present.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MinuteTimer getInstance()  
      void subscribe​(java.lang.Runnable sub)
      Add subscriber for every minute execution.
      void unsubscribe​(java.lang.Runnable sub)
      Remove subscriber from every minute execution.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static MinuteTimer getInstance()
      • subscribe

        public void subscribe​(java.lang.Runnable sub)
        Add subscriber for every minute execution.
        Parameters:
        sub - to add
      • unsubscribe

        public void unsubscribe​(java.lang.Runnable sub)
        Remove subscriber from every minute execution.
        Parameters:
        sub - to remove