Package jadex.platform.service.clock
Class Timer
- java.lang.Object
- 
- jadex.platform.service.clock.Timer
 
- 
- All Implemented Interfaces:
- ITimer,- java.io.Serializable
 - Direct Known Subclasses:
- TickTimer
 
 public class Timer extends java.lang.Object implements ITimer, java.io.Serializable A timer for being notified at a specified timepoint.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedTimer(long time, IClock clock, ITimedObject to)Create a new timer.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel the timer.longgetNotificationTime()Get the next absolute alarm timepoint.protected intgetNumber()Get the number.ITimedObjectgetTimedObject()Get the timed object.voidsetNotificationTime(long time)Change notification time.
 
- 
- 
- 
Field Detail- 
countprotected static int count The instance count.
 - 
timeprotected long time The time delta before the alarm.
 - 
clockprotected IClock clock The clock.
 - 
toprotected ITimedObject to The timed object.
 - 
numberprotected int number The instance number.
 
- 
 - 
Constructor Detail- 
Timerprotected Timer(long time, IClock clock, ITimedObject to)Create a new timer.
 
- 
 - 
Method Detail- 
getNotificationTimepublic long getNotificationTime() Get the next absolute alarm timepoint.- Specified by:
- getNotificationTimein interface- ITimer
- Returns:
- The next timepoint.
 
 - 
getTimedObjectpublic ITimedObject getTimedObject() Get the timed object.- Specified by:
- getTimedObjectin interface- ITimer
- Returns:
- The timed object.
 
 - 
setNotificationTimepublic void setNotificationTime(long time) Change notification time.- Specified by:
- setNotificationTimein interface- ITimer
- Parameters:
- The- notification time.
 
 - 
getNumberprotected int getNumber() Get the number.- Returns:
- The number.
 
 
- 
 
-