Class FasterCachedResourceResolver
java.lang.Object
org.nuiton.util.ResourceResolver
org.nuiton.util.FasterCachedResourceResolver
- All Implemented Interfaces:
URIResolver
FasterCachedResourceResolver is a URIResolver using a optimized search time algorithm.
For a given href, will try to search the exact path in classp-ath in the exact directory META-INF/cache.
The fact of using META-INF directory is optimized (special jvm directory). The other fact of using an exact directory makes also decrease dramaticly time search. Finally, we spend ten times less time in searching; moreover using the path of searched resource resolve the probleme of name colision and this is also a good thing... Exemple :href = http://foo/bar/file.txt search resource : /META-INF/cache/foo/bar/file.txt
- Author:
- chorlet
-
Field Summary
FieldsFields inherited from class ResourceResolver
base, cl, HREF_PATTERN, sourceCache, unresolvedCache, verbose -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SourcefindHrefSource(String path) voidsetOffline(boolean offline) Methods inherited from class ResourceResolver
clearCache, findRelativeSource, resolve, setCl, setVerbose
-
Field Details
-
offline
protected boolean offline
-
-
Constructor Details
-
FasterCachedResourceResolver
public FasterCachedResourceResolver() -
FasterCachedResourceResolver
-
-
Method Details
-
setOffline
public void setOffline(boolean offline) -
findHrefSource
- Overrides:
findHrefSourcein classResourceResolver
-