Package 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
A skeletal implementation that assumes the source is either URL or File.
- Author:
- tomyeh
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.zkoss.util.resource.Loader
Loader.Resource<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetLastModified(K src) Returns the last modified time, or -1 if reload is required or not exists.booleanshallCheck(K src, long expiredMillis) Returns whether to callLoader.getLastModified(K).
-
Constructor Details
-
AbstractLoader
public AbstractLoader()
-
-
Method Details
-
shallCheck
Description copied from interface:LoaderReturns whether to callLoader.getLastModified(K). If false, it assumes the current cached content is up-to-date.- Specified by:
shallCheckin interfaceLoader<K,V> expiredMillis- how many milli-seconds are expired after the last check. In most cases, just return true if expiredMillis > 0
-
getLastModified
Description copied from interface:LoaderReturns the last modified time, or -1 if reload is required or not exists.- Specified by:
getLastModifiedin interfaceLoader<K,V>
-