Interface NotificationQueueOperation<T>
- Type Parameters:
T- success response object type
public interface NotificationQueueOperation<T>
Provides methods for configuring and executing a notification queue submission.
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Starts the queueing process.onError(Consumer<NotificationQueueOperationError> errorHandler) Optional: Specifies the code to execute if an error occurs during queueing.onResolveLanguages(Function<NotificationLanguageContext, NotificationLanguageResponse> notificationLanguageFunction) Optional: Specifies the function to execute to resolve dynamic, localized language tokens before placing the notification in the queue.Optional: Specifies the code to execute upon successful notification queueing.
-
Method Details
-
onSuccess
Optional: Specifies the code to execute upon successful notification queueing.- Parameters:
successHandler-Consumerlambda to handle a successful queue operation- Returns:
- the current
NotificationQueueOperationinstance for method chaining
-
onError
Optional: Specifies the code to execute if an error occurs during queueing. If no error handler is specified, an exception is thrown on error.- Parameters:
errorHandler-Consumerlambda to handle theNotificationQueueOperationError- Returns:
- the current
NotificationQueueOperationinstance for method chaining
-
onResolveLanguages
NotificationQueueOperation<T> onResolveLanguages(Function<NotificationLanguageContext, NotificationLanguageResponse> notificationLanguageFunction) Optional: Specifies the function to execute to resolve dynamic, localized language tokens before placing the notification in the queue. Tokens resolved through this function will override any tokens set viaNotificationQueueMessage.Builder.withTokenRequest(TokenRequest).NotificationQueueMessage.Builder.withTokenRequest(TokenRequest). This will only fire for notification messages built usingNotificationQueueMessage.Builder.withTemplateName(String)- Parameters:
notificationLanguageFunction-Functionmapping aNotificationLanguageContextto aNotificationLanguageResponse- Returns:
- the current
NotificationQueueOperationinstance for method chaining
-
execute
void execute()Starts the queueing process.
-