Package gov.usgs.earthquake.distribution
Class NotificationEvent
java.lang.Object
java.util.EventObject
gov.usgs.earthquake.distribution.NotificationEvent
- All Implemented Interfaces:
Serializable
An event sent to a NotificationListener.
These events are sent by a NotificationReceiver.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionNotificationEvent
(NotificationReceiver source, Notification notification) Construct a new NotificationEvent. -
Method Summary
Modifier and TypeMethodDescriptionGet the notification associated with this NotificationEvent.A convenience method that casts event source into a NotificationReceiver.A convenience method to request a product.Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
NotificationEvent
Construct a new NotificationEvent.- Parameters:
source
- the source of this event, usually a NotificationReceiver.notification
- the notification that generated this event.
-
-
Method Details
-
getNotification
Get the notification associated with this NotificationEvent.- Returns:
- the associated notification.
-
getNotificationReceiver
A convenience method that casts event source into a NotificationReceiver.- Returns:
- source as a NotificationReceiver.
-
getProduct
A convenience method to request a product.- Returns:
- the requested product.
- Throws:
IOException
- if any errors occur while retrieving the product.Exception
-