The Timer service enables you to create and send notifications at specific dates and times, thus providing a scheduling mechanism based either on a one-time notification or on a repeated, periodic notification. The notifications or notification events are sent to all objects registered to receive notification events emitted by the Timer service. You can register an object to enable it to receive notification events by adding a notification listener interface.
The Timer class manages a list of dated notification events and provides a method which allows you to add notifications to the list or remove notifications from the list. If any of the notification events in the list have dates that have passed, the Timer service either sends them immediately or discards them. You can define this behavior by setting the sendPastNotifications flag.
The Timer service provides two types of timer notifications:
One-time notification: notification events that occur only once.
Periodic notification: notification events that are repeated with a defined periodicity and/or number of occurrences.
This behavior is defined by the parameters passed to the Timer service when the notification event is added to the list of notifications.
For more information regarding the Timer service, refer to the Java Management extensions specifications.