Package helma.framework.repository

Examples of helma.framework.repository.ResourceTracker


    public synchronized void checkForUpdates() {
        boolean updatedResources = false;

        // check if any resource the prototype knows about has changed or gone
        for (Iterator i = trackers.values().iterator(); i.hasNext();) {
            ResourceTracker tracker = (ResourceTracker) i.next();

            try {
                if (tracker.hasChanged()) {
                    updatedResources = true;
                    // let tracker know we've seen the update
                    tracker.markClean();
                    // if resource has gone remove it
                    if (!tracker.getResource().exists()) {
                        i.remove();
                        String name = tracker.getResource().getName();
                        if (name.endsWith(TypeManager.skinExtension)) {
                            skins.remove(tracker.getResource());
                        } else {
                            code.remove(tracker.getResource());
                        }
                    }
                }
            } catch (IOException iox) {
                iox.printStackTrace();
View Full Code Here


                    if (engine != null) {
                        engine.injectCodeResource(lowerCaseName, res);
                    }
                    code.add(res);
                }
                trackers.put(res.getName(), new ResourceTracker(res));
            }
        }
        return updated;
    }
View Full Code Here

TOP

Related Classes of helma.framework.repository.ResourceTracker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.