com.ibm.websphere.scheduler

Class TaskNotificationInfo

  • java.lang.Object
    • com.ibm.websphere.scheduler.TaskNotificationInfo
  • All Implemented Interfaces:
    java.io.Serializable


    public class TaskNotificationInfo
    extends java.lang.Object
    implements java.io.Serializable
    The notification information sent to a NotificationSink bean.

    When a notification is fired, the NotificationSink bean will receive an instance of this object and can then retrieve the TaskStatus and type of event that has occurred.

    Several event types are available as constants within this class. The are used both when specifying a filter on the TaskInfo.setNotificationSink method and in the TaskNotificationInfo.getEventType method when receiving a notification.

    Since:
    5.0
    Version:
    5.0
    See Also:
    NotificationSink, TaskInfo.setNotificationSink(com.ibm.websphere.scheduler.NotificationSinkHome), Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ALL_EVENTS
      Used in the TaskInfo.setNotificationSink method to indicate that all events should be captured.
      static int CANCELLED
      The task has been cancelled.
      static int COMPLETE
      The task has been completed.
      protected int eventType
      An event type constant defined in this class.
      static int FIRE_DELAYED
      The task was unable to start by the designated time or interval and was skipped.
      static int FIRE_FAILED
      The task has fired, but the TaskInfo threw an unexpected exception when executing.
      static int FIRED
      The task has fired.
      static int FIRING
      The task is firing.
      static int PURGED
      The task was purged from the persistent store.
      static int RESUMED
      The task was resumed.
      static int SCHEDULED
      The task was currently scheduled.
      static int SUSPENDED
      The task was suspended.
      protected TaskStatus taskStatus
      The TaskStatus of the task that fired this notification.
      protected java.util.Date time
      The date/time at which the notification fired or created
    • Constructor Summary

      Constructors 
      Constructor and Description
      TaskNotificationInfo(TaskStatus taskStatus, int eventType)
      Main constructor for the TaskNotificationInfo
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getEventType()
      The type of event that was fired.
      TaskStatus getTaskStatus()
      Get the TaskStatus of the task that fired this notification.
      java.util.Date getTime()
      The date/time at which the notification was fired.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COMPLETE

        public static final int COMPLETE
        The task has been completed. The number of repeats left on the scheduled TaskInfo have reached zero.
        Since:
        5.0
        See Also:
        Constant Field Values
      • FIRED

        public static final int FIRED
        The task has fired. The FIRED event occurs immediately after the task successfully executes. The FIRED event only occurs when task execution is successful, if the task throws an exeception during execution, then the notification event will be FIRE_FAILED rather than FIRED.
        Since:
        5.0
        See Also:
        TaskInfo, FIRE_FAILED, Constant Field Values
      • FIRE_FAILED

        public static final int FIRE_FAILED
        The task has fired, but the TaskInfo threw an unexpected exception when executing.
        Since:
        5.0
        See Also:
        TaskInfo, Constant Field Values
      • FIRE_DELAYED

        public static final int FIRE_DELAYED
        The task was unable to start by the designated time or interval and was skipped. This occurs when the scheduler daemon was unable to fire a task at the scheduled time and has exceeded the start-by interval set for the task. The task will be rescheduled for the next available time if the repeat count hasn't reached zero.
        Since:
        5.0
        See Also:
        TaskInfo.setStartByInterval(java.lang.String), Constant Field Values
      • FIRING

        public static final int FIRING
        The task is firing. The FIRING event occurs immediately before the task executes.
        Since:
        5.03
        See Also:
        Constant Field Values
      • taskStatus

        protected TaskStatus taskStatus
        The TaskStatus of the task that fired this notification.
        Since:
        5.0
      • eventType

        protected int eventType
        An event type constant defined in this class.
        Since:
        5.0
      • time

        protected java.util.Date time
        The date/time at which the notification fired or created
        Since:
        5.0
    • Constructor Detail

      • TaskNotificationInfo

        public TaskNotificationInfo(TaskStatus taskStatus,
                            int eventType)
        Main constructor for the TaskNotificationInfo
        Parameters:
        taskStatus - the current TaskStatus.
        eventType - the type of event to notify with.
        Since:
        5.0
    • Method Detail

      • getTaskStatus

        public TaskStatus getTaskStatus()
        Get the TaskStatus of the task that fired this notification.
        Returns:
        the TaskStatus of the task that fired this notification.
        Since:
        5.0
      • getTime

        public java.util.Date getTime()
        The date/time at which the notification was fired.
        Returns:
        the java.util.Date at which the notification was fired.
        Since:
        5.0
IBM WebSphere Application ServerTM
Release 8.5