Class StandardNotification
java.lang.Object
dev.getelements.elements.service.notification.StandardNotification
- All Implemented Interfaces:
Notification
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintsend(Consumer<NotificationEvent> success, Consumer<Exception> failure) Enqueues thisNotificationto be sent.voidsetNotificationDestinationFactory(NotificationDestinationFactory notificationDestinationFactory) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.service.notification.Notification
send
-
Constructor Details
-
StandardNotification
-
-
Method Details
-
send
Description copied from interface:NotificationEnqueues thisNotificationto be sent. This call may block, but should return as reasonably quickly as possible. This does not guarantee delivery, and may drop the message without reporting an error if necessary but should make all reasonable efforts to ensure the message has been sent. For example, this may ensure that the message was received by the underlying message service but will not provide a guarantee that it was delivered when it returns. Not that either lambda may be called multiple times, or never called.- Specified by:
sendin interfaceNotification- Parameters:
success- called when a message was successfully sent, note this may be called multiple timesfailure- called when a message failed- Returns:
- the number of destinations that recieved the
Notification
-
getNotificationParameters
-
getNotificationDestinationFactory
public Function<NotificationParameters,Stream<NotificationDestination>> getNotificationDestinationFactory() -
setNotificationDestinationFactory
@Inject public void setNotificationDestinationFactory(NotificationDestinationFactory notificationDestinationFactory)
-