javax.slee.facilities
Interface TimerEvent


public interface TimerEvent

This interface is implemented by timer events generated by the Timer Facility.

The event type name of timer events is "javax.slee.facilities.TimerEvent".


Method Summary
 long getExpiryTime()
          Get the time that the timer event was actually fired.
 int getMissedRepetitions()
          Get the number of timer events missed between the firing of the timer's last timer event and this timer event.
 int getNumRepetitions()
          Get the number of repetitions the timer was set with.
 long getPeriod()
          Get the period of the timer.
 int getRemainingRepetitions()
          Get the number of repetitions remaining for the timer.
 long getScheduledTime()
          Get the time that this timer event was scheduled to be fired.
 TimerID getTimerID()
          Get the timer ID of the timer that fired this event.
 

Method Detail

getTimerID

public TimerID getTimerID()
Get the timer ID of the timer that fired this event.
Returns:
the timer ID.

getScheduledTime

public long getScheduledTime()
Get the time that this timer event was scheduled to be fired.
Returns:
the time (in ms since January 1, 1970 UTC) that this timer event was scheduled to be fired.
See Also:
getExpiryTime()

getExpiryTime

public long getExpiryTime()
Get the time that the timer event was actually fired. This time should be close to the current time (unless the event has been delayed in the event router or by other higher priority SBB entities).
Returns:
the time (in ms since January 1, 1970 UTC) that this timer event was fired.
See Also:
getScheduledTime()

getPeriod

public long getPeriod()
Get the period of the timer.
Returns:
the period of the timer. For non-repeating timers, the value returned is Long.MAX_VALUE.

getNumRepetitions

public int getNumRepetitions()
Get the number of repetitions the timer was set with. This is the same as the repetitions specified when the timer was set.
Returns:
the number of repetitions for the timer. For infinitely-repeating timers, the value returned is 0. For non-repeating timers the value returned is 1.

getRemainingRepetitions

public int getRemainingRepetitions()
Get the number of repetitions remaining for the timer.
Returns:
the number of remaining repetitions. For infinitely-repeating timers, the value returned is always Integer.MAX_VALUE. For finitely-repeating timers the value is getNumRepetitions() - iteration number. For non-repeating timers, the value returned is 0.

getMissedRepetitions

public int getMissedRepetitions()
Get the number of timer events missed between the firing of the timer's last timer event and this timer event.
Returns:
the number of missed repetitions.