| package pta.de.core.controller; |
| |
| import org.apache.log4j.Logger; |
| import pta.de.core.exceptions.HttpStatusException; |
| |
| import java.util.TimerTask; |
| |
| public class ServicesConfigCacheTimerTask extends TimerTask { |
| private String configFileName; |
| |
| public ServicesConfigCacheTimerTask( String configFileName ) { |
| this.configFileName = configFileName; |
| } |
| |
| private static final Logger logger = Logger.getLogger(ServicesConfigCacheTimerTask.class.getName()); |
| |
| @Override |
| public void run() { |
| logger.debug("ServicesConfigCacheTimerTask started"); |
| |
| try { |
| ServicesConfigCache.getInstance().readServerDistribution(this.configFileName); |
| } catch (HttpStatusException e) { |
| logger.error("Error reading ServerDistributionFile", e); |
| } |
| |
| logger.debug("ServicesConfigCacheTimerTask finished"); |
| } |
| } |