Class NextTimer
java.lang.Object
com.swiftmq.impl.streams.comp.timer.NextTimer
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionStarts the timer at the begin of the next dayStarts the timer at the begin of the next hourStarts the timer at the begin of the next minuteStarts the timer at the begin of the next secondvoid
close()
Closes this Timer.void
collect
(long interval) Internal usevoid
Internal use.TimerListener
Internal use.name()
Returns the name of the Timer.onTimer
(TimerCallback callback) Sets the onTimer callback.void
Reconfigures this Timer and applies new settingsreset()
Resets the value of a Timervoid
setTimerListener
(TimerListener listener) Internal use.void
start()
Starts this Timer.toString()
-
Method Details
-
executeCallback
Description copied from interface:Timer
Internal use.- Specified by:
executeCallback
in interfaceTimer
- Throws:
Exception
-
beginOfDay
Starts the timer at the begin of the next day- Returns:
- this
-
beginOfHour
Starts the timer at the begin of the next hour- Returns:
- this
-
beginOfMinute
Starts the timer at the begin of the next minute- Returns:
- this
-
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 interfaceTimer
-
getTimerListener
public TimerListener getTimerListener()Description copied from interface:Timer
Internal use.- Specified by:
getTimerListener
in interfaceTimer
-
name
Description copied from interface:Timer
Returns the name of the Timer. -
onTimer
Description copied from interface:Timer
Sets the onTimer callback. -
collect
public void collect(long interval) Description copied from interface:Timer
Internal use -
start
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. -
reset
Description copied from interface:Timer
Resets the value of a Timer -
reconfigure
Description copied from interface:Timer
Reconfigures this Timer and applies new settings- Specified by:
reconfigure
in interfaceTimer
- Throws:
Exception
-
close
public void close()Description copied from interface:Timer
Closes this Timer. -
toString
-