Interface NotificationStateAware
-
public interface NotificationStateAwareA domain that keeps track ofNotificationState- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Optional<NotificationState>findNotificationState(String messageProducerType)Looks up a NotificationState from the states within this collectionList<NotificationState>getNotificationStates()Retrieve the message sending status for one or moreNotificationStateinstances.default List<NotificationState>getNotificationStates(boolean fetch)Retrieve the message sending status for one or moreNotificationStateinstances.voidsetNotificationStates(List<NotificationState> notificationStates)Set the message sending status for one or moreNotificationStateinstances.
-
-
-
Method Detail
-
getNotificationStates
List<NotificationState> getNotificationStates()
Retrieve the message sending status for one or moreNotificationStateinstances.- Returns:
- Retrieve the message sending status for one or more
NotificationStateinstances.
-
getNotificationStates
default List<NotificationState> getNotificationStates(boolean fetch)
Retrieve the message sending status for one or moreNotificationStateinstances. Furthermore, specify whether the backing implementation should try to fetch associatedNotificationStateinstances from the datastore, if applicable. By default, this simply delegates togetNotificationStates().- Parameters:
fetch- Whether or not attempt to fetch from the back datastore, if required.- Returns:
- Retrieve the message sending status for one or more
NotificationStateinstances.
-
setNotificationStates
void setNotificationStates(List<NotificationState> notificationStates)
Set the message sending status for one or moreNotificationStateinstances.
-
findNotificationState
default Optional<NotificationState> findNotificationState(String messageProducerType)
Looks up a NotificationState from the states within this collection- Parameters:
messageProducerType- an identifier for the message channel producing the message- Returns:
- an optional containing the NotificationState for the given message producer or an empty optional otherwise
-
-