Class DistributableTimer<I>

  • All Implemented Interfaces:
    jakarta.ejb.Timer, ManagedTimer

    public class DistributableTimer<I>
    extends Object
    implements ManagedTimer
    Managed timer facade for a distributable EJB timer.
    Author:
    Paul Ferraro
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: ManagedTimer
        The unique identifier of this timer.
        Specified by:
        getId in interface ManagedTimer
        Returns:
        a unique identifier
      • isActive

        public boolean isActive()
        Description copied from interface: ManagedTimer
        Indicates whether this timer is active, i.e. not suspended.
        Specified by:
        isActive in interface ManagedTimer
        Returns:
        true, if this timer is active, false otherwise.
      • isCanceled

        public boolean isCanceled()
        Description copied from interface: ManagedTimer
        Indicates whether this timer was canceled, i.e. via Timer.cancel().
        Specified by:
        isCanceled in interface ManagedTimer
        Returns:
        true, if this timer was canceled, false otherwise.
      • isExpired

        public boolean isExpired()
        Description copied from interface: ManagedTimer
        Indicates whether this timer has expired, i.e. it has no more timeouts. An interval timer will always return false.
        Specified by:
        isExpired in interface ManagedTimer
        Returns:
        true, if this timer has expired, false otherwise.
      • activate

        public void activate()
        Description copied from interface: ManagedTimer
        Activates a previously suspended timer. Once active, the timer will receive timeout events as usual, including any timeouts missed while inactive.
        Specified by:
        activate in interface ManagedTimer
      • suspend

        public void suspend()
        Description copied from interface: ManagedTimer
        Suspends a previously active timer. While suspended, the timer will not receive timeout events.
        Specified by:
        suspend in interface ManagedTimer
      • invoke

        public void invoke()
                    throws Exception
        Description copied from interface: ManagedTimer
        Invokes the timeout method associated with this timer. Has no impact on this timer's schedule.
        Specified by:
        invoke in interface ManagedTimer
        Throws:
        Exception
      • cancel

        public void cancel()
        Specified by:
        cancel in interface jakarta.ejb.Timer
      • getTimeRemaining

        public long getTimeRemaining()
        Specified by:
        getTimeRemaining in interface jakarta.ejb.Timer
      • getNextTimeout

        public Date getNextTimeout()
        Specified by:
        getNextTimeout in interface jakarta.ejb.Timer
      • getInfo

        public Serializable getInfo()
        Specified by:
        getInfo in interface jakarta.ejb.Timer
      • getHandle

        public jakarta.ejb.TimerHandle getHandle()
        Specified by:
        getHandle in interface jakarta.ejb.Timer
      • getSchedule

        public jakarta.ejb.ScheduleExpression getSchedule()
        Specified by:
        getSchedule in interface jakarta.ejb.Timer
      • isCalendarTimer

        public boolean isCalendarTimer()
        Specified by:
        isCalendarTimer in interface jakarta.ejb.Timer
      • isPersistent

        public boolean isPersistent()
        Specified by:
        isPersistent in interface jakarta.ejb.Timer
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object