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 boolean
equals(Notification that)
A comparison method to see if two notifications are equal.java.util.Date
getExpirationDate()
How long the product is available.ProductId
getProductId()
The product that is available.java.net.URL
getTrackerURL()
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:Notification
How long the product is available.- Specified by:
getExpirationDate
in interfaceNotification
- Returns:
- how long the product is available.
-
getProductId
public ProductId getProductId()
Description copied from interface:Notification
The product that is available.- Specified by:
getProductId
in interfaceNotification
- Returns:
- which product is available.
-
getTrackerURL
public java.net.URL getTrackerURL()
Description copied from interface:Notification
A tracking url where status updates can be sent.- Specified by:
getTrackerURL
in 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:
equals
in interfaceNotification
- Parameters:
that
- Notification- Returns:
- boolean
-
-