org.nuiton.util
Class FasterCachedResourceResolver
java.lang.Object
org.nuiton.util.ResourceResolver
org.nuiton.util.FasterCachedResourceResolver
- All Implemented Interfaces:
- URIResolver
public class FasterCachedResourceResolver
- extends ResourceResolver
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
- Version:
- $Revision: 1948 $
Last update : $Date: 2010-11-17 22:31:00 +0100 (mer, 17 nov 2010) $
By :
- Author:
- chorlet
|
Field Summary |
protected boolean |
offline
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
offline
protected boolean offline
FasterCachedResourceResolver
public FasterCachedResourceResolver()
FasterCachedResourceResolver
public FasterCachedResourceResolver(String base)
setOffline
public void setOffline(boolean offline)
findHrefSource
protected Source findHrefSource(String path)
- Overrides:
findHrefSource in class ResourceResolver
Copyright © 2004-2011 CodeLutin. All Rights Reserved.