Interface Timer

All Known Implementing Classes:
AtTimer, IntervalTimer, NextTimer

public interface Timer
Base interface for Timers.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this Timer.
    void
    collect(long interval)
    Internal use
    void
    Internal use.
    com.swiftmq.swiftlet.timer.event.TimerListener
    Internal use.
    Returns the name of the Timer.
    Sets the onTimer callback.
    void
    Reconfigures this Timer and applies new settings
    Resets the value of a Timer
    void
    setTimerListener(com.swiftmq.swiftlet.timer.event.TimerListener listener)
    Internal use.
    void
    Starts this Timer.
  • Method Details

    • setTimerListener

      void setTimerListener(com.swiftmq.swiftlet.timer.event.TimerListener listener)
      Internal use.
    • getTimerListener

      com.swiftmq.swiftlet.timer.event.TimerListener getTimerListener()
      Internal use.
    • name

      String name()
      Returns the name of the Timer.
      Returns:
      Name
    • onTimer

      Timer onTimer(TimerCallback callback)
      Sets the onTimer callback.
      Parameters:
      callback - callback
      Returns:
      Timer
    • executeCallback

      void executeCallback() throws Exception
      Internal use.
      Throws:
      Exception
    • collect

      void collect(long interval)
      Internal use
    • start

      void start() throws Exception
      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.
      Throws:
      Exception
    • reset

      Timer reset()
      Resets the value of a Timer
    • reconfigure

      void reconfigure() throws Exception
      Reconfigures this Timer and applies new settings
      Throws:
      Exception
    • close

      void close()
      Closes this Timer.