Package net.sf.eBus.util
Class TimerEvent
- java.lang.Object
-
- java.util.EventObject
-
- net.sf.eBus.util.TimerEvent
-
- All Implemented Interfaces:
Serializable
public final class TimerEvent extends EventObject
ATimerEventevent is sent to thoseTimerTaskListenerobjects registered with an expiredTimerTask.Note: The event's source is a
TimerTask.- Author:
- Charles Rapp
- See Also:
TimerTask,TimerTaskListener, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description TimerEvent(TimerTask timerTask, Object value)Creates a timer event for the specified timer task.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels the underlyingtimer task.Objectvalue()Returns the timer task associated value.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
TimerEvent
public TimerEvent(TimerTask timerTask, Object value)
Creates a timer event for the specified timer task. The timer task is the event source. The value is the one passed toTimerTask(net.sf.eBus.util.TimerTaskListener, java.lang.Object).- Parameters:
timerTask- The event source.value- The timer's associated value. May benull.- See Also:
TimerTask
-
-
Method Detail
-
value
public Object value()
Returns the timer task associated value. May returnnull.- Returns:
- the timer task associated value.
-
cancel
public void cancel()
Cancels the underlyingtimer task.- See Also:
TimerTask
-
-