public class CalendarTimer extends TimerImpl
Timer which is created out a calendar expression| Modifier and Type | Class and Description |
|---|---|
static class |
CalendarTimer.Builder |
handle, id, info, initialExpiration, intervalDuration, nextExpiration, persistent, previousRun, primaryKey, timedObjectInvoker, timerService, timerState| Constructor and Description |
|---|
CalendarTimer(CalendarTimer.Builder builder,
TimerServiceImpl timerService)
Constructs a
CalendarTimer |
| Modifier and Type | Method and Description |
|---|---|
static CalendarTimer.Builder |
builder() |
boolean |
equals(Object obj)
A
Timer is equal to another Timer if their
TimerHandles are equal |
CalendarBasedTimeout |
getCalendarTimeout()
Returns the
CalendarBasedTimeout corresponding to this
CalendarTimer |
javax.ejb.ScheduleExpression |
getSchedule() |
javax.ejb.ScheduleExpression |
getScheduleExpression()
This method is similar to
getSchedule(), except that this method does not check the timer state
and hence does not throw either IllegalStateException or NoSuchObjectLocalException
or EJBException. |
Method |
getTimeoutMethod() |
static Method |
getTimeoutMethod(TimeoutMethod timeoutMethodInfo,
ClassLoader classLoader)
Returns the
Method, represented by the TimeoutMethod |
protected TimerTask<?> |
getTimerTask()
Returns the task which handles the timeouts on this
CalendarTimer |
void |
handleRestorationCalculation()
Makes sure that the timer is only run once after being restored.
|
int |
hashCode() |
boolean |
isAutoTimer()
Returns true if this is an auto-timer.
|
boolean |
isCalendarTimer() |
assertTimerState, cancel, cancelTimeout, getExecutingThread, getHandle, getId, getInfo, getInitialExpiration, getInterval, getNextExpiration, getNextTimeout, getPreviousRun, getPrimaryKey, getState, getTimedObjectId, getTimeRemaining, getTimerHandle, getTimerInfo, getTimerService, invokeOneOff, isActive, isCanceled, isExpired, isInRetry, isPersistent, isTimerPersistent, lock, scheduleTimeout, setNextTimeout, setPreviousRun, setTimerState, setTimerState, suspend, toString, unlockpublic CalendarTimer(CalendarTimer.Builder builder, TimerServiceImpl timerService)
CalendarTimerid - The id of this timertimerService - The timer service to which this timer belongscalendarTimeout - The CalendarBasedTimeout from which this CalendarTimer is being createdinfo - The serializable info which will be made available through Timer.getInfo()persistent - True if this timer is persistent. False otherwisetimeoutMethod - If this is a non-null value, then this CalendarTimer is marked as an auto-timer.
This timeoutMethod is then considered as the name of the timeout method which has to
be invoked when this timer times out.public javax.ejb.ScheduleExpression getSchedule()
throws IllegalStateException,
javax.ejb.EJBException
getSchedule in interface javax.ejb.TimergetSchedule in class TimerImplIllegalStateExceptionjavax.ejb.EJBExceptiongetScheduleExpression()public javax.ejb.ScheduleExpression getScheduleExpression()
getSchedule(), except that this method does not check the timer state
and hence does not throw either IllegalStateException or NoSuchObjectLocalException
or EJBException.public boolean isCalendarTimer()
throws IllegalStateException,
javax.ejb.EJBException
isCalendarTimer in interface javax.ejb.TimerisCalendarTimer in class TimerImplIllegalStateExceptionjavax.ejb.EJBExceptionpublic CalendarBasedTimeout getCalendarTimeout()
CalendarBasedTimeout corresponding to this
CalendarTimerpublic boolean isAutoTimer()
isAutoTimer in class TimerImplprotected TimerTask<?> getTimerTask()
CalendarTimergetTimerTask in class TimerImplCalendarTimerTaskpublic Method getTimeoutMethod()
public boolean equals(Object obj)
Timer is equal to another Timer if their
TimerHandles are equalpublic static CalendarTimer.Builder builder()
public void handleRestorationCalculation()
public static Method getTimeoutMethod(TimeoutMethod timeoutMethodInfo, ClassLoader classLoader)
Method, represented by the TimeoutMethod
Note: This method uses the Thread.getContextClassLoader() to load the
relevant classes while getting the Method
timeoutMethodInfo - The timeout methodclassLoader - The class loaderCopyright © 2019 JBoss by Red Hat. All rights reserved.