Interface EntityNotificationProcessingHandler<E extends SimpleEntity>
-
- Type Parameters:
E- the entity that have notifications to be processed
public interface EntityNotificationProcessingHandler<E extends SimpleEntity>Processes the notifications for a specificNotificationProcessingEntityType.
For each new constant of typeNotificationProcessingEntityTypeTHERE MUST BE a corresponding implementation of this interface. Otherwise the server will throw an error at start up.
Subclasses must use theNotificationHandlerto notify the users. That handler will finally create theNotificationentity and insert an execution of the corresponding background task to effectively send the notification.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NotificationProcessingEntityType<E>getType()The type this handler is associated to.List<E>loadToNotify(List<Long> ids)Returns a list of entities to be notified, with the given idsvoidprocess(E entity)Processes the notifications generated by the given entity
-
-
-
Method Detail
-
getType
NotificationProcessingEntityType<E> getType()
The type this handler is associated to.
-
loadToNotify
List<E> loadToNotify(List<Long> ids)
Returns a list of entities to be notified, with the given ids
-
process
void process(E entity)
Processes the notifications generated by the given entity
-
-