2 |
|
|
3 |
import java.util.logging.Logger; |
import java.util.logging.Logger; |
4 |
|
|
5 |
|
/* Simple CircuitBreaker implementation - snipped from http://www.jroller.com/kenwdelong/entry/circuit_breaker_in_java |
6 |
|
* |
7 |
|
* example of how it can be used |
8 |
|
|
9 |
|
private CircuitBreaker cb = new CircuitBreaker("test", 5, 10000); |
10 |
/* example of how it can be used |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
|
11 |
class TestInvocation implements CircuitInvocation { |
class TestInvocation implements CircuitInvocation { |
12 |
String url; |
String url; |
13 |
public TestInvocation(String url) { |
public TestInvocation(String url) { |