class ChannelChain {

    public NotifyStatistics send(Subscriber subscriber, List<NotificationEventTO> events) {
        NotifyStatistics statistics = new NotifyStatistics();

        if (events == null || events.isEmpty()) {
            return statistics;
        }
        // TODO (REVIEW independent notifySubscriber): iterate over subscriber's channels instead of all channels
        for (Channel channel : channels) {
            boolean delivered = false;

            if (!subscriber.getChannels().contains(channel.getChannelName()))
                continue;
            try {
                channel.send(subscriber, events);
                delivered = true;
            } catch (Exception e) {
                log.error("Could not send via the channel [" + channel.getChannelName() + "] for the subscriber [" + subscriber.getId() + "] because of: " + e);
            } finally {
                statistics.addChannelResponse(channel.getChannelName(), delivered);
            }
        }
        return statistics;
    }

}