1 |
package dk.thoerup.traininfoservice; |
package dk.thoerup.traininfoservice; |
2 |
|
|
3 |
|
import javax.servlet.ServletContext; |
4 |
|
|
5 |
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
6 |
import dk.thoerup.webconfig.ConfigVariable; |
import dk.thoerup.webconfig.ConfigVariable; |
7 |
|
import dk.thoerup.webconfig.ContextConfigLoader; |
8 |
import dk.thoerup.webconfig.ReloadConfig; |
import dk.thoerup.webconfig.ReloadConfig; |
9 |
|
|
10 |
|
|
11 |
public class TraininfoSettings implements BreakerConfig{ |
public class TraininfoSettings implements BreakerConfig{ |
12 |
|
|
13 |
|
ServletContext cxt; |
14 |
|
public TraininfoSettings(ServletContext cxt) { |
15 |
|
this.cxt = cxt; |
16 |
|
} |
17 |
|
|
18 |
@ConfigVariable |
@ConfigVariable |
19 |
boolean useazuresite; |
boolean useazuresite; |
20 |
|
|
32 |
|
|
33 |
@ConfigVariable |
@ConfigVariable |
34 |
int reply_timeout; |
int reply_timeout; |
35 |
|
|
36 |
@ReloadConfig |
@ReloadConfig |
37 |
public void reloadConfig() { |
public void reloadConfig() { |
38 |
System.out.println("Reloading config"); |
System.out.println("Reloading config"); |
39 |
|
new ContextConfigLoader(cxt).loadConfig(this); |
40 |
} |
} |
41 |
|
|
42 |
public boolean getUseAzureSite() { |
public boolean getUseAzureSite() { |