Interface INotificationEmitter<T extends INotificationData>
- All Superinterfaces:
AutoCloseable,Closeable
Represents a notification emitter for an
INotificationData type.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecipient(INotificationRecipient recipient) Add aINotificationRecipientto the recipient list which will be used to emit the nextINotificationData.voidclear()Clear the previously addedINotificationRecipient(s)Produce and return a new instance ofINotificationRecipientBuildervoidEmit theINotificationDatawith the previously addedINotificationRecipient(addRecipient(INotificationRecipient)) and clear the previously addedINotificationRecipient(s)voidEmit theINotificationDatawith the previously addedINotificationRecipient(addRecipient(INotificationRecipient))
-
Method Details
-
createRecipientBuilder
INotificationRecipientBuilder createRecipientBuilder()Produce and return a new instance ofINotificationRecipientBuilder- Returns:
- a new
INotificationRecipientBuilderinstance
-
addRecipient
Add aINotificationRecipientto the recipient list which will be used to emit the nextINotificationData.- Parameters:
recipient- theINotificationRecipientto add
-
emit
Emit theINotificationDatawith the previously addedINotificationRecipient(addRecipient(INotificationRecipient)) and clear the previously addedINotificationRecipient(s)- Parameters:
notificationData- theINotificationDatato emit
-
emit
Emit theINotificationDatawith the previously addedINotificationRecipient(addRecipient(INotificationRecipient))- Parameters:
notificationData- theINotificationDatato emitclearRecipients- if true the previously addedINotificationRecipientwill be clear after emit theINotificationDatadata, otherwise the previously added recipients won't be changed.
-
clear
void clear()Clear the previously addedINotificationRecipient(s)
-