@SuppressWarnings({"unchecked", "rawtypes"})
    private void dispatch(NotificationDto<?> notification) {
        // LOGGER.trace("User has an email notification preference: {0}", emailPrefs);
        LOGGER.trace("Notification is a candidate for processing: {0}", notification);
        // TODO can easily optimise this for prefix matching (regex or whatever).
        Map<String, Object> defaultTemplateMap = createDefaultTemplateMap(notification, config);
        handlers.stream()
             .filter(handler -> handler.wants(notification))
             .forEach(handler -> handler.handle((NotificationDto) notification, defaultTemplateMap));
    }
Observe, filter, and process notifications.

<ul>
    <li>Get email preferences for intended recipient</li>
    <li>Determine whether user wants emails for category notification belongs to</li>
    <li>If so, process notification, else drop through silently</li>
</ul>
manager/api/rest-impl/src/main/java/io/apiman/manager/api/notifications/email/EmailNotificationDispatcher.java