Parent Directory | Revision Log
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 | package dk.thoerup.circuitbreaker.notification; |
2 | |
3 | import java.util.logging.Logger; |
4 | |
5 | import dk.thoerup.circuitbreaker.CircuitBreaker; |
6 | |
7 | public class JavaLogNotifier implements Notifier { |
8 | |
9 | Logger logger = Logger.getLogger(JavaLogNotifier.class.getName()); |
10 | |
11 | public void sendNotification(CircuitBreaker breaker, Event evnt) { |
12 | |
13 | logger.warning("Circuitbreaker " + breaker.getName() + " : " + evnt.toString() ); |
14 | } |
15 | |
16 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |