Interface AppNotificationHandler
-
- All Known Implementing Classes:
FcmAppNotificationHandlerImpl
public interface AppNotificationHandlerHandler to send app notifications (aka push notifications)
Known implementations:FcmAppNotificationHandlerImpl
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanReceiveNotifications(BasicUser user)Returns whether the app notifications are configured for the user and if it also has the required mediums to receive it (e.g an FCM registration token).
If false no notifications will be sent to this specific user.booleannotify(AppNotificationMessage notification)Sends (synchronously) a new app notification.voidvalidate(BasicUser user, Object medium)Validates the given medium used to send the app notification to the user.
-
-
-
Method Detail
-
canReceiveNotifications
boolean canReceiveNotifications(BasicUser user)
Returns whether the app notifications are configured for the user and if it also has the required mediums to receive it (e.g an FCM registration token).
If false no notifications will be sent to this specific user.
-
notify
boolean notify(AppNotificationMessage notification)
Sends (synchronously) a new app notification.- Returns:
- whether the notification was sent or not.
-
validate
void validate(BasicUser user, Object medium) throws AppNotificationException, ValidationException
Validates the given medium used to send the app notification to the user. The medium depends on the underlying implementation, e.g in case of FCM it would be a token of type String.
-
-