Timer interface contains information about a timer
that was created through the EJB Timer Service.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public TimerHandle | |
| public Serializable | Returns: The Serializable object that was passed in at timer creation, or null if the info argument passed in at timer creation was null.Get the information associated with the timer at the time of creation. |
| public Date | Returns: the point in time at which the next timer expiration is scheduled to occur.Get the point in time at which the next timer expiration is scheduled to occur. |
| public ScheduleExpression | Returns: schedule expression for the timer.Get the schedule expression corresponding to this timer. |
| public long | Returns: the number of milliseconds that will elapse before the next scheduled timer expiration.Get the number of milliseconds that will elapse before the next scheduled timer expiration. |
| public boolean | Returns: boolean indicating whether the timer is calendar-based.Return whether this timer is a calendar-based timer. |
| public boolean | Returns: boolean indicating whether the timer is persistent.Return whether this timer has persistent semantics. |
| cancel | back to summary |
|---|---|
| public void cancel() throws IllegalStateException, NoSuchObjectLocalException, EJBException Cause the timer and all its associated expiration notifications to be cancelled.
| |
| getHandle | back to summary |
|---|---|
| public TimerHandle getHandle() throws IllegalStateException, NoSuchObjectLocalException, EJBException Get a serializable handle to the timer. This handle can be used at a later time to re-obtain the timer reference.
| |
| getInfo | back to summary |
|---|---|
| public Serializable getInfo() throws IllegalStateException, NoSuchObjectLocalException, EJBException Get the information associated with the timer at the time of
creation. This may be the
| |
| getNextTimeout | back to summary |
|---|---|
| public Date getNextTimeout() throws IllegalStateException, NoSuchObjectLocalException, NoMoreTimeoutsException, EJBException Get the point in time at which the next timer expiration is scheduled to occur.
| |
| getSchedule | back to summary |
|---|---|
| public ScheduleExpression getSchedule() throws IllegalStateException, NoSuchObjectLocalException, EJBException Get the schedule expression corresponding to this timer. The timer must be a calendar-based timer. It may have been created automatically or programmatically.
| |
| getTimeRemaining | back to summary |
|---|---|
| public long getTimeRemaining() throws IllegalStateException, NoSuchObjectLocalException, NoMoreTimeoutsException, EJBException Get the number of milliseconds that will elapse before the next scheduled timer expiration.
| |
| isCalendarTimer | back to summary |
|---|---|
| public boolean isCalendarTimer() throws IllegalStateException, NoSuchObjectLocalException, EJBException Return whether this timer is a calendar-based timer.
| |
| isPersistent | back to summary |
|---|---|
| public boolean isPersistent() throws IllegalStateException, NoSuchObjectLocalException, EJBException Return whether this timer has persistent semantics.
| |