/[projects]/miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/notification/CompositeNotifier.java
ViewVC logotype

Contents of /miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/notification/CompositeNotifier.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1049 - (show annotations) (download)
Tue Sep 14 06:19:19 2010 UTC (13 years, 8 months ago) by torben
Original Path: CircuitBreaker/src/dk/thoerup/circuitbreaker/notification/AggregateNotifier.java
File size: 438 byte(s)
Add aggregate notifier in order to handle several notifications
1 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