Class NextTimer

java.lang.Object
com.swiftmq.impl.streams.comp.timer.NextTimer
All Implemented Interfaces:
Timer

public class NextTimer extends Object implements Timer
Next Timer implementation. Executes the onTimer callback once at the begin of a specific time.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2017, All Rights Reserved
  • Method Details

    • executeCallback

      public void executeCallback() throws Exception
      Description copied from interface: Timer
      Internal use.
      Specified by:
      executeCallback in interface Timer
      Throws:
      Exception
    • beginOfDay

      public NextTimer beginOfDay()
      Starts the timer at the begin of the next day
      Returns:
      this
    • beginOfHour

      public NextTimer beginOfHour()
      Starts the timer at the begin of the next hour
      Returns:
      this
    • beginOfMinute

      public NextTimer beginOfMinute()
      Starts the timer at the begin of the next minute
      Returns:
      this
    • beginOfSecond

      public NextTimer beginOfSecond()
      Starts the timer at the begin of the next second
      Returns:
      this
    • setTimerListener

      public void setTimerListener(TimerListener listener)
      Description copied from interface: Timer
      Internal use.
      Specified by:
      setTimerListener in interface Timer
    • getTimerListener

      public TimerListener getTimerListener()
      Description copied from interface: Timer
      Internal use.
      Specified by:
      getTimerListener in interface Timer
    • name

      public String name()
      Description copied from interface: Timer
      Returns the name of the Timer.
      Specified by:
      name in interface Timer
      Returns:
      Name
    • onTimer

      public Timer onTimer(TimerCallback callback)
      Description copied from interface: Timer
      Sets the onTimer callback.
      Specified by:
      onTimer in interface Timer
      Parameters:
      callback - callback
      Returns:
      Timer
    • collect

      public void collect(long interval)
      Description copied from interface: Timer
      Internal use
      Specified by:
      collect in interface Timer
    • start

      public void start() throws Exception
      Description copied from interface: Timer
      Starts this Timer. This method is called automatically if a Timer is created outside a callback. If it is created inside, it must be called explicitly.
      Specified by:
      start in interface Timer
      Throws:
      Exception
    • reset

      public Timer reset()
      Description copied from interface: Timer
      Resets the value of a Timer
      Specified by:
      reset in interface Timer
    • reconfigure

      public void reconfigure() throws Exception
      Description copied from interface: Timer
      Reconfigures this Timer and applies new settings
      Specified by:
      reconfigure in interface Timer
      Throws:
      Exception
    • close

      public void close()
      Description copied from interface: Timer
      Closes this Timer.
      Specified by:
      close in interface Timer
    • toString

      public String toString()
      Overrides:
      toString in class Object