public interface Notification extends Renderable
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Notification> |
CREATED_TIME_SORTER
Sorts notifications by creation time, oldest first.
|
static Comparator<Notification> |
LAST_UPDATED_TIME_SORTER
Sorts notifications by last update time, newest first.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(NotificationListener notificationListener)
Adds the given notification listener.
|
void |
dismiss()
Dismisses this notification.
|
long |
getCreatedTime()
Returns the time when this notifiation was created.
|
String |
getId()
Returns the unique ID of this notification.
|
long |
getLastUpdatedTime()
Returns the time when this notifiation was last updated.
|
boolean |
isDismissable()
Returns whether this notification may be dismissed by the user.
|
void |
removeNotificationListener(NotificationListener notificationListener)
Removes the given notification listener.
|
void |
render(Writer writer)
Renders this notification to the given writer.
|
static final Comparator<Notification> CREATED_TIME_SORTER
static final Comparator<Notification> LAST_UPDATED_TIME_SORTER
void addNotificationListener(NotificationListener notificationListener)
notificationListener - The listener to addvoid removeNotificationListener(NotificationListener notificationListener)
notificationListener - The listener to removeString getId()
long getLastUpdatedTime()
long getCreatedTime()
boolean isDismissable()
true if this notification is dismissable by the user,
false otherwisevoid dismiss()
void render(Writer writer) throws IOException
render in interface Renderablewriter - The writer to render this notification toIOException - if an I/O error occursCopyright © 2026. All rights reserved.