|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wegra.util.resource.CachedResourceLoader
ResourceLoader that loads from specified loader and uses a cache. You can specify your own cache. if you don't specify cache it will use GenericCache that never return resource until cache is referenced.
Field Summary | |
protected Cache |
fCache
|
protected ResourceLoader |
fLoader
|
Constructor Summary | |
CachedResourceLoader(ResourceLoader loader)
Creates a CachedResourceLoader that loads from the specified loader and uses default cache. |
|
CachedResourceLoader(ResourceLoader loader,
Cache cache)
Creates a CachedResourceLoader that loads from the specified loader and uses specified cache. |
Method Summary | |
java.lang.Object |
getResource(java.lang.Object key)
Loads specified resource. |
java.lang.Object |
getResource(java.lang.String location)
Loads specified resource. |
java.lang.Object[] |
getResources(java.lang.Object baseKey)
Loads sub resources of specified baseKey. |
java.lang.Object[] |
getResources(java.lang.String baseLocation)
Loads sub resources of specified baseLocation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ResourceLoader fLoader
protected Cache fCache
Constructor Detail |
public CachedResourceLoader(ResourceLoader loader)
loader
- loader to read from.public CachedResourceLoader(ResourceLoader loader, Cache cache)
loader
- loader to read from.cache
- cache to use.Method Detail |
public java.lang.Object getResource(java.lang.Object key) throws ResourceLoaderException
getResource
in interface ResourceLoader
key
- key of resource.
ResourceLoaderException
public java.lang.Object getResource(java.lang.String location) throws ResourceLoaderException
getResource
in interface ResourceLoader
location
- resource location.
ResourceLoaderException
public java.lang.Object[] getResources(java.lang.Object baseKey) throws ResourceLoaderException
getResources
in interface ResourceLoader
baseKey
- base key of resource.
ResourceLoaderException
public java.lang.Object[] getResources(java.lang.String baseLocation) throws ResourceLoaderException
getResources
in interface ResourceLoader
baseLocation
- base location of resource.
ResourceLoaderException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |