java.lang.Object
org.jboss.as.ejb3.timerservice.AbstractManagedTimer
org.jboss.as.ejb3.timerservice.distributable.OOBTimer<I>
Type Parameters:
I - the timer identifier type
All Implemented Interfaces:
jakarta.ejb.Timer, ManagedTimer

public class OOBTimer<I> extends AbstractManagedTimer
Timer implementation for use outside the context of a timeout event. Ensures that all timer methods are invoked within the context of a batch.
Author:
Paul Ferraro
  • Constructor Details

  • Method Details

    • cancel

      public void cancel()
    • getTimeRemaining

      public long getTimeRemaining()
    • getNextTimeout

      public Date getNextTimeout()
    • getSchedule

      public jakarta.ejb.ScheduleExpression getSchedule()
    • isPersistent

      public boolean isPersistent()
    • isCalendarTimer

      public boolean isCalendarTimer()
    • getInfo

      public Serializable getInfo()
    • getHandle

      public jakarta.ejb.TimerHandle getHandle()
    • getId

      public String getId()
      Description copied from interface: ManagedTimer
      The unique identifier of this timer.
      Specified by:
      getId in interface ManagedTimer
      Overrides:
      getId in class AbstractManagedTimer
      Returns:
      a unique identifier
    • 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.
    • suspend

      public void suspend()
      Description copied from interface: ManagedTimer
      Suspends a previously active timer. While suspended, the timer will not receive timeout events.
    • 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.
      Throws:
      Exception
    • isActive

      public boolean isActive()
      Description copied from interface: ManagedTimer
      Indicates whether this timer is active, i.e. not suspended.
      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().
      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.
      Returns:
      true, if this timer has expired, false otherwise.