class DeliveryNotificationSenderManager {

    public void sendMessage(Delivery delivery) {
        final List<DeliveryNotificationType> notifications = delivery.getDeliveryNotificationTypes();

        if (!notifications.isEmpty())
            for (DeliveryNotificationType type : notifications)
                getInstanceByType(type).send(buildMessage(delivery));
    }

    @Autowired public  DeliveryNotificationSenderManager(DeliveryNotificationSenderFactory deliveryNotificationSenderFactory);

}