Class SchemeRefPreprocessor
- java.lang.Object
-
- com.tangosol.coherence.config.xml.preprocessor.SchemeRefPreprocessor
-
- All Implemented Interfaces:
DocumentElementPreprocessor.ElementPreprocessor
public class SchemeRefPreprocessor extends Object implements DocumentElementPreprocessor.ElementPreprocessor
ASchemeRefPreprocessor
is anDocumentElementPreprocessor.ElementPreprocessor
that resolves declarations of <scheme-ref> as required by Coherence.- Since:
- Coherence 12.1.2
- Author:
- bo 2011.08.03
-
-
Field Summary
Fields Modifier and Type Field Description static SchemeRefPreprocessor
INSTANCE
This singleton instance of theSchemeRefPreprocessor
.
-
Constructor Summary
Constructors Constructor Description SchemeRefPreprocessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlElement
findCachingScheme(String sSchemeName, XmlElement element)
Obtains theXmlElement
that contains a <scheme-name> definition for the specified sSchemeName with in the providedXmlElement
, ornull
if not found.boolean
preprocess(ProcessingContext context, XmlElement element)
Process anXmlElement
, optionally mutating it (or it's children) if required.
-
-
-
Field Detail
-
INSTANCE
public static final SchemeRefPreprocessor INSTANCE
This singleton instance of theSchemeRefPreprocessor
.
-
-
Method Detail
-
preprocess
public boolean preprocess(ProcessingContext context, XmlElement element) throws ConfigurationException
Process anXmlElement
, optionally mutating it (or it's children) if required.Note: An implementation of this interface should avoid attempting to traverse child
XmlElement
s. If you wish to manually traverse or change the entire document, you should instead use aDocumentPreprocessor
.- Specified by:
preprocess
in interfaceDocumentElementPreprocessor.ElementPreprocessor
- Parameters:
context
- theProcessingContext
in which the pre-processing is occurringelement
- theXmlElement
to preprocess- Returns:
true
if the specifiedXmlElement
should be re-preprocessed by this and otherDocumentElementPreprocessor.ElementPreprocessor
s due to theXmlElement
being modified,false
otherwise.- Throws:
ConfigurationException
- if during pre-processing of theXmlElement
a configuration issue was discovered (or if pre-processing fails for some reason)
-
findCachingScheme
public XmlElement findCachingScheme(String sSchemeName, XmlElement element)
Obtains theXmlElement
that contains a <scheme-name> definition for the specified sSchemeName with in the providedXmlElement
, ornull
if not found.- Parameters:
sSchemeName
- The scheme name to locateelement
- TheXmlElement
to search- Returns:
- the caching scheme xml element
-
-