1 package org.openecomp.sdc.notification.services.impl;
3 import org.openecomp.sdc.destinationprovider.impl.MulticastDestination;
4 import org.openecomp.sdc.destinationprovider.impl.UnicastDestination;
5 import org.openecomp.sdc.notification.dtos.Event;
6 import org.openecomp.sdc.notification.services.NotificationPropagationManager;
7 import org.openecomp.sdc.notification.services.PropagationService;
8 import org.openecomp.sdc.notification.services.SubscriptionService;
12 * @since July 10, 2017
14 public class NotificationPropagationManagerImpl implements NotificationPropagationManager {
16 private PropagationService propagationService;
17 private SubscriptionService subscriptionService;
19 public NotificationPropagationManagerImpl(PropagationService propagationService,
20 SubscriptionService subscriptionService) {
21 this.propagationService = propagationService;
22 this.subscriptionService = subscriptionService;
26 public void notifySubscribers(Event event, String ... excludedSubscribers) {
27 propagationService.notify(event, new MulticastDestination(event.getEntityId(),
28 subscriptionService, excludedSubscribers));
32 public void directNotification(Event event, String destinationId) {
33 propagationService.notify(event, new UnicastDestination(destinationId));