public final class VolatileNotificationRepositoryAndFactory extends Object implements NotificationRepository, NotificationFactory
NotificationRepository.NotificationRemover| Constructor and Description | 
|---|
| VolatileNotificationRepositoryAndFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| Notification | createAndPersist(String soundUrl,
                String buildDetails)Creates a  Notificationand makes it instantly available in theNotificationRepository. | 
| List<Notification> | findNewerThan(NotificationId id)Returns each  Notificationthat is newer than, i.e. | 
| NotificationId | getLastNotificationId()Returns the id of the newest  Notificationornullif the repository is empty. | 
| void | remove(NotificationRepository.NotificationRemover remover)Provides access to an  Iteratorthat can be used to remove individual notifications. | 
public VolatileNotificationRepositoryAndFactory()
public Notification createAndPersist(String soundUrl, String buildDetails)
NotificationFactoryNotification and makes it instantly available in the NotificationRepository.createAndPersist in interface NotificationFactorysoundUrl - URL of a sound that should be playedbuildDetails - details about the build that caused the notification, used for loggingpublic NotificationId getLastNotificationId()
NotificationRepositoryNotification or null if the repository is empty.getLastNotificationId in interface NotificationRepositorypublic List<Notification> findNewerThan(NotificationId id)
NotificationRepositoryNotification that is newer than, i.e. happened after, a provided notification.
 
 Clients waiting for new notifications are notified (Object.notifyAll()) when new
 notifications are available.
findNewerThan in interface NotificationRepositoryid - a NotificationId or null to list each notificationpublic void remove(NotificationRepository.NotificationRemover remover)
NotificationRepositoryIterator that can be used to remove individual notifications.remove in interface NotificationRepositoryCopyright © 2004-2011. All Rights Reserved.