Interface AlarmListener

  • Deprecated. 
    Interfaces for alarms and alarm management are replaced by ManagedScheduledExecutorService and related interfaces.

    public interface AlarmListener
    This interface is implemented by a Java object that will receive alarm notifications. An object implementing this interface can be supplied to the AlarmManager.create method and used as the target for an alarm. When the alarm fires then the fired method is called and the alarm firing is provided as a parameter. By providing the alarm as a parameter, the same object instance could be used for multiple alarms.
    See Also:
    javax.enterprise.concurrent.ManagedScheduledExecutorService, Alarm, AlarmManager
    • Method Summary

      Modifier and Type Method and Description
      void fired(Alarm alarm)
      This method is called when an alarm fires.
    • Method Detail

      • fired

        void fired(Alarm alarm)
        This method is called when an alarm fires. If the alarm is a one shot event or is the last alarm in a periodic alarm then the alarm should be cancelled. Cancelling the alarm allows it to be reused thus saving memory and increasing performance. If the alarm is a repeating alarm then the Alarm.reset method should be called to schedule the alarm to fire again later. This again improves performance through memory optimizations.
        alarm - This is the alarm that actually fired. The context of the alarm can be retrieved using the Alarm.getContext method.
IBM WebSphere Application ServerTM
Release 9.0