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

Annotation of /miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/notification/JavaLogNotifier.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1161 - (hide annotations) (download)
Mon Oct 4 17:36:43 2010 UTC (13 years, 8 months ago) by torben
Original Path: CircuitBreaker/src/dk/thoerup/circuitbreaker/notification/JavaLogNotifier.java
File size: 432 byte(s)
If the Notifier gets a reference to the CircuitBreaker itself instead of the circuitbreaker's name then the same notifier instance can easily 
be shared across several circuitbreakers
1 torben 467 package dk.thoerup.circuitbreaker.notification;
2 torben 409
3     import java.util.logging.Logger;
4    
5 torben 1161 import dk.thoerup.circuitbreaker.CircuitBreaker;
6    
7 torben 409 public class JavaLogNotifier implements Notifier {
8    
9     Logger logger = Logger.getLogger(JavaLogNotifier.class.getName());
10    
11 torben 1161 public void sendNotification(CircuitBreaker breaker, Event evnt) {
12 torben 409
13 torben 1161 logger.warning("Circuitbreaker " + breaker.getName() + " : " + evnt.toString() );
14 torben 409 }
15    
16     }

  ViewVC Help
Powered by ViewVC 1.1.20