The Timer interface contains information about a timer that was created
through the EJB Timer Service.
See Also:EJB 3.0 specification author: Florent Benoit
Method Summary
void
cancel() Cause the timer and all its associated expiration notifications to be
cancelled.
Cause the timer and all its associated expiration notifications to be
cancelled.
throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: NoSuchObjectLocalException - If invoked on a timer that has expiredor has been cancelled. throws: EJBException - If this method could not complete due to asystem-level failure.
Get a serializable handle to the timer. This handle can be used at a
later time to re-obtain the timer reference.
a serializable handle to the timer. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: NoSuchObjectLocalException - If invoked on a timer that has expiredor has been cancelled. throws: EJBException - If this method could not complete due to asystem-level failure.
Get the information associated with the timer at the time of creation.
The Serializable object that was passed in at timer creation, ornull if the info argument passed in at timer creation was null. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: NoSuchObjectLocalException - If invoked on a timer that has expiredor has been cancelled. throws: EJBException - If this method could not complete due to asystem-level failure.
Get the point in time at which the next timer expiration is scheduled to
occur.
the point in time at which the next timer expiration is scheduledto occur. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: NoSuchObjectLocalException - If invoked on a timer that has expiredor has been cancelled. throws: EJBException - If this method could not complete due to asystem-level failure.
Get the number of milliseconds that will elapse before the next scheduled
timer expiration.
the number of milliseconds that will elapse before the nextscheduled timer expiration. throws: IllegalStateException - If this method is invoked while theinstance is in a state that does not allow access to this method. throws: NoSuchObjectLocalException - If invoked on a timer that has expiredor has been cancelled. throws: EJBException - If this method could not complete due to asystem-level failure.