Class NotificationEvent

java.lang.Object
java.util.EventObject
gov.usgs.earthquake.distribution.NotificationEvent
All Implemented Interfaces:
Serializable

public class NotificationEvent extends EventObject
An event sent to a NotificationListener. These events are sent by a NotificationReceiver.
See Also:
  • Constructor Details

    • 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 Details

    • 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 Exception
      A convenience method to request a product.
      Returns:
      the requested product.
      Throws:
      IOException - if any errors occur while retrieving the product.
      Exception