Class NotificationEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class NotificationEvent
    extends java.util.EventObject
    An event sent to a NotificationListener. These events are sent by a NotificationReceiver.
    See Also:
    Serialized Form
    • Constructor Detail

      • NotificationEvent

        public NotificationEvent​(NotificationReceiver source,
                                 Notification notification)
        Construct a new NotificationEvent.
        Parameters:
        source - the source of this event, usually a NotificationReceiver.
        notification - the notification that generated this event.
    • Method Detail

      • getNotification

        public Notification getNotification()
        Get the notification associated with this NotificationEvent.
        Returns:
        the associated notification.
      • getNotificationReceiver

        public NotificationReceiver getNotificationReceiver()
        A convenience method that casts event source into a NotificationReceiver.
        Returns:
        source as a NotificationReceiver.
      • getProduct

        public Product getProduct()
                           throws java.lang.Exception
        A convenience method to request a product.
        Returns:
        the requested product.
        Throws:
        java.io.IOException - if any errors occur while retrieving the product.
        java.lang.Exception