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

Diff of /CircuitBreaker/src/dk/thoerup/circuitbreaker/notification/CompositeNotifier.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1160 by torben, Wed Sep 22 07:38:04 2010 UTC revision 1161 by torben, Mon Oct 4 17:36:43 2010 UTC
# Line 3  package dk.thoerup.circuitbreaker.notifi Line 3  package dk.thoerup.circuitbreaker.notifi
3  import java.util.ArrayList;  import java.util.ArrayList;
4  import java.util.List;  import java.util.List;
5    
6    import dk.thoerup.circuitbreaker.CircuitBreaker;
7    
8  public class CompositeNotifier implements Notifier {  public class CompositeNotifier implements Notifier {
9                    
10          List<Notifier> children = new ArrayList<Notifier>();          List<Notifier> children = new ArrayList<Notifier>();
# Line 11  public class CompositeNotifier implement Line 13  public class CompositeNotifier implement
13                  children.add(notif);                  children.add(notif);
14          }          }
15    
16          public void sendNotification(String breakerName, Event evnt) {          public void sendNotification(CircuitBreaker breaker, Event evnt) {
17                  for (Notifier notif : children) {                  for (Notifier notif : children) {
18                          notif.sendNotification(breakerName, evnt);                          notif.sendNotification(breaker, evnt);
19                  }                  }
20          }          }
21    

Legend:
Removed from v.1160  
changed lines
  Added in v.1161

  ViewVC Help
Powered by ViewVC 1.1.20