Interface NotificationStateAware
-
public interface NotificationStateAware
A 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 moreNotificationState
instances.default List<NotificationState>
getNotificationStates(boolean fetch)
Retrieve the message sending status for one or moreNotificationState
instances.void
setNotificationStates(List<NotificationState> notificationStates)
Set the message sending status for one or moreNotificationState
instances.
-
-
-
Method Detail
-
getNotificationStates
List<NotificationState> getNotificationStates()
Retrieve the message sending status for one or moreNotificationState
instances.- Returns:
- Retrieve the message sending status for one or more
NotificationState
instances.
-
getNotificationStates
default List<NotificationState> getNotificationStates(boolean fetch)
Retrieve the message sending status for one or moreNotificationState
instances. Furthermore, specify whether the backing implementation should try to fetch associatedNotificationState
instances 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
NotificationState
instances.
-
setNotificationStates
void setNotificationStates(List<NotificationState> notificationStates)
Set the message sending status for one or moreNotificationState
instances.
-
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
-
-