public class CalendarTimer extends TimerImpl
Timer
which is created out a calendar expressionModifier 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
TimerHandle s 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,
TimedObjectInvoker timedObjectInvoker)
Returns the
Method , represented by the TimeoutMethod |
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, getHandle, getId, getInfo, getInitialExpiration, getInterval, getNextExpiration, getNextTimeout, getPreviousRun, getPrimaryKey, getState, getTimedObjectId, getTimeRemaining, getTimerHandle, getTimerInfo, getTimerService, invoke, isActive, isCanceled, isExpired, isInRetry, isPersistent, isTimerPersistent, lock, scheduleTimeout, setNextTimeout, setPreviousRun, setTimerState, suspend, toString, unlock
public CalendarTimer(CalendarTimer.Builder builder, TimerServiceImpl timerService)
CalendarTimer
id
- 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.Timer
getSchedule
in class TimerImpl
IllegalStateException
javax.ejb.EJBException
getScheduleExpression()
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.Timer
isCalendarTimer
in class TimerImpl
IllegalStateException
javax.ejb.EJBException
public CalendarBasedTimeout getCalendarTimeout()
CalendarBasedTimeout
corresponding to this
CalendarTimer
public boolean isAutoTimer()
isAutoTimer
in class TimerImpl
protected TimerTask<?> getTimerTask()
CalendarTimer
getTimerTask
in class TimerImpl
CalendarTimerTask
public Method getTimeoutMethod()
public boolean equals(Object obj)
Timer
is equal to another Timer
if their
TimerHandle
s are equalpublic static CalendarTimer.Builder builder()
public static Method getTimeoutMethod(TimeoutMethod timeoutMethodInfo, TimedObjectInvoker timedObjectInvoker)
Method
, represented by the TimeoutMethod
Note: This method uses the Thread.getContextClassLoader()
to load the
relevant classes while getting the Method
timeoutMethodInfo
- The timeout methodtimedObjectInvoker
- Copyright © 2014 JBoss by Red Hat. All rights reserved.