Package gov.usgs.earthquake.distribution
Class NotificationEvent
- java.lang.Object
-
- java.util.EventObject
-
- gov.usgs.earthquake.distribution.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 Summary
Constructors Constructor Description NotificationEvent(NotificationReceiver source, Notification notification)
Construct a new NotificationEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Notification
getNotification()
Get the notification associated with this NotificationEvent.NotificationReceiver
getNotificationReceiver()
A convenience method that casts event source into a NotificationReceiver.Product
getProduct()
A convenience method to request a product.
-
-
-
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
-
-