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