FileDocCategorySizeDatePackage
DigestedList.javaAPI DocExample1294Sun Aug 29 22:18:58 BST 2004com.oreilly.strutsckbk.ch10

DigestedList

public class DigestedList extends RefreshableList

Fields Summary
private static Log
log
private URL
sourceUrl
private URL
rulesUrl
Constructors Summary
public DigestedList(List list, URL sourceUrl, URL rulesUrl)


           
        this.sourceUrl = sourceUrl;
        this.rulesUrl = rulesUrl;
        this.backingList = list;
    
Methods Summary
public synchronized voidrefresh()

        Digester digester = DigesterLoader.createDigester(rulesUrl);
        try {
            List list = (List) digester.parse(sourceUrl.openStream());
            if (list != null) 
                backingList = list;
            else {
                log.error("Returned list was null due to unknown error");
                throw new CacheException("Backing list was null.");
            }
        } catch (Exception e) {
            log.error("Unable to redigest list.", e);
            throw new CacheException("Unable to redigest list.");
        }