org.zkoss.util.resource
Class AbstractLoader<K,V>
java.lang.Object
org.zkoss.util.resource.AbstractLoader<K,V>
- All Implemented Interfaces:
- Loader<K,V>
- Direct Known Subclasses:
- ContentLoader
public abstract class AbstractLoader<K,V>
- extends Object
- implements Loader<K,V>
A skeletal implementation that assumes the source is either URL or File.
- Author:
- tomyeh
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.zkoss.util.resource.Loader |
load |
AbstractLoader
public AbstractLoader()
shallCheck
public boolean shallCheck(K src,
long expiredMillis)
- Description copied from interface:
Loader
- Returns whether to call
Loader.getLastModified(K).
If false, it assumes the current cached content is up-to-date.
- Specified by:
shallCheck in interface Loader<K,V>
expiredMillis - how many milli-seconds are expired after the last
check. In most cases, just return true if expiredMillis > 0
getLastModified
public long getLastModified(K src)
- Description copied from interface:
Loader
- Returns the last modified time, or -1 if reload is required or not exists.
- Specified by:
getLastModified in interface Loader<K,V>
Copyright © 2014. All rights reserved.