public interface NotificationsManager
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Observer observer)
Adds an observer to this notifications manager.
|
void |
cancel(java.lang.String tag)
Cancels a notification.
|
void |
cancelAll()
Cancels all notifications.
|
void |
deleteObserver(Observer observer)
Deletes an observer.
|
Notification[] |
getNotifications()
Gets all active notifications.
|
void |
notify(Notification notification)
Posts a notification.
|
void addObserver(Observer observer) throws java.lang.NullPointerException
The observer will be notified when notifications will be posted or canceled.
observer
- an observer to be added.java.lang.NullPointerException
- if the given observer is null
.Observable.addObserver(Observer)
,
notify(Notification)
,
cancel(String)
,
cancelAll()
void deleteObserver(Observer observer)
The observer will no longer be notified of notifications events.
observer
- an observer to be removed.Observable.deleteObserver(Observer)
void notify(Notification notification)
The observers will be notified with the notification tag as argument.
notification
- the notification to be posted.void cancel(java.lang.String tag)
The observers will be notified with the tag as argument.
tag
- the tag to cancel.void cancelAll()
The observers will be notified with a null
argument.
Notification[] getNotifications()