|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xerces.parsers.CachingParserPool.SynchronizedGrammarPool
public static final class CachingParserPool.SynchronizedGrammarPool
Synchronized grammar pool.
Constructor Summary | |
---|---|
CachingParserPool.SynchronizedGrammarPool(XMLGrammarPool grammarPool)
Constructs a synchronized grammar pool. |
Method Summary | |
---|---|
void |
cacheGrammars(java.lang.String grammarType,
Grammar[] grammars)
return the final set of grammars that the validator ended up with. |
void |
clear()
clear the grammar pool |
void |
lockPool()
lock the grammar pool |
Grammar |
retrieveGrammar(XMLGrammarDescription gDesc)
This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. |
Grammar[] |
retrieveInitialGrammarSet(java.lang.String grammarType)
retrieve the initial known set of grammars. |
void |
unlockPool()
unlock the grammar pool |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingParserPool.SynchronizedGrammarPool(XMLGrammarPool grammarPool)
Method Detail |
---|
public Grammar[] retrieveInitialGrammarSet(java.lang.String grammarType)
XMLGrammarPool
retrieve the initial known set of grammars. this method is called by a validator before the validation starts. the application can provide an initial set of grammars available to the current validation attempt.
retrieveInitialGrammarSet
in interface XMLGrammarPool
grammarType
- the type of the grammar, from the
org.apache.xerces.xni.grammars.Grammar
interface.
public Grammar retrieveGrammar(XMLGrammarDescription gDesc)
XMLGrammarPool
This method requests that the application retrieve a grammar corresponding to the given GrammarIdentifier from its cache. If it cannot do so it must return null; the parser will then call the EntityResolver. An application must not call its EntityResolver itself from this method; this may result in infinite recursions.
retrieveGrammar
in interface XMLGrammarPool
gDesc
- The description of the Grammar being requested.
public void cacheGrammars(java.lang.String grammarType, Grammar[] grammars)
XMLGrammarPool
return the final set of grammars that the validator ended up with. This method is called after the validation finishes. The application may then choose to cache some of the returned grammars.
cacheGrammars
in interface XMLGrammarPool
grammarType
- the type of the grammars being returned;grammars
- an array containing the set of grammars being
returned; order is not significant.public void lockPool()
lockPool
in interface XMLGrammarPool
public void clear()
clear
in interface XMLGrammarPool
public void unlockPool()
unlockPool
in interface XMLGrammarPool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |