public class CalendarTimer extends TimerImpl
Timer which is created out a calendar expressionhandle, id, info, initialExpiration, intervalDuration, nextExpiration, persistent, previousRun, primaryKey, timedObjectInvoker, timerService, timerState| Constructor and Description |
|---|
CalendarTimer(CalendarTimerEntity persistedCalendarTimer,
TimerServiceImpl timerService)
Constructs a
CalendarTimer from a persistent state |
CalendarTimer(String id,
TimerServiceImpl timerService,
CalendarBasedTimeout calendarTimeout,
Object primaryKey)
Constructs a
CalendarTimer |
CalendarTimer(String id,
TimerServiceImpl timerService,
CalendarBasedTimeout calendarTimeout,
Serializable info,
boolean persistent,
Method timeoutMethod,
Object primaryKey)
Constructs a
CalendarTimer |
CalendarTimer(String id,
TimerServiceImpl timerService,
CalendarBasedTimeout calendarTimeout,
Serializable info,
boolean persistent,
Object primaryKey)
Constructs a
CalendarTimer |
| Modifier and Type | Method and Description |
|---|---|
protected TimerEntity |
createPersistentState()
Creates and return a new persistent state of this timer
|
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() |
protected TimerTask<?> |
getTimerTask()
Returns the task which handles the timeouts on this
CalendarTimer |
int |
hashCode() |
boolean |
isAutoTimer()
Returns true if this is an auto-timer.
|
boolean |
isCalendarTimer() |
assertTimerState, cancel, cancelTimeout, expireTimer, getHandle, getId, getInfo, getInitialExpiration, getInterval, getNextExpiration, getNextTimeout, getPersistentState, getPreviousRun, getPrimaryKey, getState, getTimedObjectId, getTimeRemaining, getTimerHandle, getTimerInfo, getTimerService, isActive, isCanceled, isExpired, isInRetry, isPersistent, scheduleTimeout, setNextTimeout, setPreviousRun, setTimerState, suspend, toStringpublic CalendarTimer(String id, TimerServiceImpl timerService, CalendarBasedTimeout calendarTimeout, Object primaryKey)
CalendarTimerid - The id of this timertimerService - The timer service to which this timer belongscalendarTimeout - The CalendarBasedTimeout from which this CalendarTimer is being createdpublic CalendarTimer(String id, TimerServiceImpl timerService, CalendarBasedTimeout calendarTimeout, Serializable info, boolean persistent, Object primaryKey)
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 otherwisepublic CalendarTimer(String id, TimerServiceImpl timerService, CalendarBasedTimeout calendarTimeout, Serializable info, boolean persistent, Method timeoutMethod, Object primaryKey)
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 CalendarTimer(CalendarTimerEntity persistedCalendarTimer, TimerServiceImpl timerService)
CalendarTimer from a persistent statepersistedCalendarTimer - The persistent state of the calendar timertimerService - The timer service to which this timer belongspublic 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.EJBExceptionprotected TimerEntity createPersistentState()
createPersistentState in class TimerImplpublic CalendarBasedTimeout getCalendarTimeout()
CalendarBasedTimeout corresponding to this
CalendarTimerpublic boolean isAutoTimer()
isAutoTimer in class TimerImplprotected TimerTask<?> getTimerTask()
CalendarTimergetTimerTask in class TimerImplCalendarTimerTaskpublic Method getTimeoutMethod()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.