Parent Directory | Revision Log
Enabled the usage of Circuit breaker to guard agains bane.dk failures
1 | package dk.thoerup.traininfoservice.banedk; |
2 | |
3 | import com.gargoylesoftware.htmlunit.WebClient; |
4 | |
5 | import dk.thoerup.curcuitbreaker.CircuitInvocation; |
6 | |
7 | public class BanedkInvocation implements CircuitInvocation { |
8 | |
9 | WebClient client; |
10 | String uri; |
11 | |
12 | public BanedkInvocation(WebClient client, String uri) { |
13 | this.client = client; |
14 | this.uri = uri; |
15 | } |
16 | |
17 | |
18 | @Override |
19 | public Object proceed() throws Exception { |
20 | return client.getPage(uri); |
21 | } |
22 | |
23 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |