|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidadinternal.share.io.CachingNameResolver
public class CachingNameResolver
NameResolver that adds caching support. Providers that receive cached results (via setCachedResult) will be stored in a dictionary for later retrieval.
InputStreamProvider.setCachedResult(java.lang.Object)
Constructor Summary | |
---|---|
CachingNameResolver(NameResolver base,
java.util.Map<java.lang.Object,InputStreamProvider> storage,
boolean checkModified)
Creates a caching name resolver. |
|
CachingNameResolver(NameResolver base,
java.util.Map<java.lang.Object,InputStreamProvider> storage,
int msBetweenChecks)
Creates a caching name resolver that will check modification times on each request, with the ability to override the default amount of time that must go by before a modification time is rechecked. |
Method Summary | |
---|---|
InputStreamProvider |
getProvider(java.lang.String name)
Given a name, returns an InputStreamProvider. |
NameResolver |
getResolver(java.lang.String name)
Return the new NameResolver that should be used to resolve names relative to a given name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CachingNameResolver(NameResolver base, java.util.Map<java.lang.Object,InputStreamProvider> storage, boolean checkModified)
base
- a base NameResolver to wrapstorage
- the Map to store results, or null
to use a default cache.checkModified
- if true, last-modified times
will be checked on every requestpublic CachingNameResolver(NameResolver base, java.util.Map<java.lang.Object,InputStreamProvider> storage, int msBetweenChecks)
base
- a base NameResolver to wrapstorage
- the Map to store results, or null
to use a default cache.msBetweenChecks
- The number of milliseconds required to elapse
before checking the modification time again.Method Detail |
---|
public InputStreamProvider getProvider(java.lang.String name) throws java.io.IOException
getProvider
in interface NameResolver
name
- the name of the target
java.io.IOException
public NameResolver getResolver(java.lang.String name)
getResolver
in interface NameResolver
name
- the name of the targetpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |