/** * Trigger manual refresh mechanism, the module will check all its * URLs and generate change events if any of them has changed. This * will allow the owning registry to force a module upgrade at next * module request. */ public void refresh() { URI[] urls = moduleDef.getLocations(); boolean notify = false; for (URI lib : urls) { File f = new File(lib); if (f.exists() && lastModifieds.containsKey(f.getAbsolutePath())) { if (lastModifieds.get(f.getAbsolutePath()) !=f.lastModified()) { //Utils.getDefaultLogger().info("Changed : " + this); notify = true; break; } } } if(notify) { fireChangeEvent(); } }
/** * Trigger manual refresh mechanism, the module will check all its * URLs and generate change events if any of them has changed. This * will allow the owning registry to force a module upgrade at next * module request. */ public void refresh() { URI[] urls = moduleDef.getLocations(); boolean notify = false; for (URI lib : urls) { File f = new File(lib); if (f.exists() && lastModifieds.containsKey(f.getAbsolutePath())) { if (lastModifieds.get(f.getAbsolutePath()) !=f.lastModified()) { //Utils.getDefaultLogger().info("Changed : " + this); notify = true; break; } } } if(notify) { fireChangeEvent(); } }