Parent Directory | Revision Log
Add aggregate notifier in order to handle several notifications
1 | torben | 1049 | package dk.thoerup.circuitbreaker.notification; |
2 | |||
3 | import java.util.ArrayList; | ||
4 | import java.util.List; | ||
5 | |||
6 | public class AggregateNotifier implements Notifier { | ||
7 | |||
8 | List<Notifier> children = new ArrayList<Notifier>(); | ||
9 | |||
10 | public void addNotifier(Notifier notif) { | ||
11 | children.add(notif); | ||
12 | } | ||
13 | |||
14 | public void sendNotification(String breakerName, Event evnt) { | ||
15 | for (Notifier notif : children) { | ||
16 | notif.sendNotification(breakerName, evnt); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |