public interface INotificationEmitter<T extends INotificationData> extends Closeable
INotificationData
type.Modifier and Type | Method and Description |
---|---|
void |
addRecipient(INotificationRecipient recipient)
Add a
INotificationRecipient to the recipient list which will be used to emit the next INotificationData . |
void |
clear()
Clear the previously added
INotificationRecipient (s) |
INotificationRecipientBuilder |
createRecipientBuilder()
Produce and return a new instance of
INotificationRecipientBuilder |
void |
emit(T notificationData)
Emit the
INotificationData with the previously added INotificationRecipient (addRecipient(INotificationRecipient) ) and clear the previously added INotificationRecipient (s) |
void |
emit(T notificationData,
boolean clearRecipients)
Emit the
INotificationData with the previously added INotificationRecipient (addRecipient(INotificationRecipient) ) |
INotificationRecipientBuilder createRecipientBuilder()
INotificationRecipientBuilder
INotificationRecipientBuilder
instancevoid addRecipient(INotificationRecipient recipient)
INotificationRecipient
to the recipient list which will be used to emit the next INotificationData
.recipient
- the INotificationRecipient
to addvoid emit(T notificationData)
INotificationData
with the previously added INotificationRecipient
(addRecipient(INotificationRecipient)
) and clear the previously added INotificationRecipient
(s)notificationData
- the INotificationData
to emitvoid emit(T notificationData, boolean clearRecipients)
INotificationData
with the previously added INotificationRecipient
(addRecipient(INotificationRecipient)
)notificationData
- the INotificationData
to emitclearRecipients
- if true the previously added INotificationRecipient
will be clear after emit the INotificationData
data, otherwise the previously added recipients won't be changed.void clear()
INotificationRecipient
(s)Copyright © 2022 Visiativ. All rights reserved.