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) |
| Modifier and Type | Method and Description |
|---|---|
static CalendarTimer.Builder |
builder() |
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.
|
boolean |
isAutoTimer()
Returns true if this is an auto-timer.
|
boolean |
isCalendarTimer() |
String |
toString()
A nice formatted string output for this timer
|
assertTimerState, cancel, cancelTimeout, equals, getExecutingThread, getHandle, getId, getInfo, getInitialExpiration, getInterval, getNextExpiration, getNextTimeout, getPreviousRun, getPrimaryKey, getState, getTimedObjectId, getTimeRemaining, getTimerInfo, getTimerService, hashCode, invokeOneOff, isActive, isCanceled, isExpired, isInRetry, isPersistent, lock, scheduleTimeout, setNextTimeout, setPreviousRun, setTimerState, suspend, unlockpublic CalendarTimer(CalendarTimer.Builder builder, TimerServiceImpl timerService)
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 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 © 2021 JBoss by Red Hat. All rights reserved.