Package gov.usgs.earthquake.distribution
Class DefaultNotification
- java.lang.Object
-
- gov.usgs.earthquake.distribution.DefaultNotification
-
- All Implemented Interfaces:
Notification
- Direct Known Subclasses:
URLNotification
public class DefaultNotification extends java.lang.Object implements Notification
A DefaultNotification is a implementation of the Notification interface. No location information is stored about products, and must be tracked separately.
-
-
Constructor Summary
Constructors Constructor Description DefaultNotification(ProductId id, java.util.Date expirationDate, java.net.URL trackerURL)Construct a DefaultNotification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Notification that)A comparison method to see if two notifications are equal.java.util.DategetExpirationDate()How long the product is available.ProductIdgetProductId()The product that is available.java.net.URLgetTrackerURL()A tracking url where status updates can be sent.
-
-
-
Constructor Detail
-
DefaultNotification
public DefaultNotification(ProductId id, java.util.Date expirationDate, java.net.URL trackerURL)
Construct a DefaultNotification.- Parameters:
id- the product that is available.expirationDate- how long the product is available.trackerURL- where to send tracking updates.
-
-
Method Detail
-
getExpirationDate
public java.util.Date getExpirationDate()
Description copied from interface:NotificationHow long the product is available.- Specified by:
getExpirationDatein interfaceNotification- Returns:
- how long the product is available.
-
getProductId
public ProductId getProductId()
Description copied from interface:NotificationThe product that is available.- Specified by:
getProductIdin interfaceNotification- Returns:
- which product is available.
-
getTrackerURL
public java.net.URL getTrackerURL()
Description copied from interface:NotificationA tracking url where status updates can be sent.- Specified by:
getTrackerURLin interfaceNotification- Returns:
- location to send tracking updates.
-
equals
public boolean equals(Notification that)
A comparison method to see if two notifications are equal.- Specified by:
equalsin interfaceNotification- Parameters:
that- Notification- Returns:
- boolean
-
-