Class SpecificInstanceProcessor<T>
java.lang.Object
com.tangosol.coherence.config.xml.processor.AbstractEmptyElementProcessor<T>
com.tangosol.coherence.config.xml.processor.SpecificInstanceProcessor<T>
- All Implemented Interfaces:
ConditionalElementProcessor<T>,ElementProcessor<T>
An
ElementProcessor that will process an XmlElement defining
a ParameterizedBuilder, after which it will eagerly realized to produce
an instance of the required type.- Since:
- Coherence 12.1.3
- Author:
- bo 2013.03.11
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.coherence.config.xml.processor.AbstractEmptyElementProcessor
AbstractEmptyElementProcessor.EmptyElementBehavior -
Constructor Summary
ConstructorsConstructorDescriptionSpecificInstanceProcessor(Class<T> clzToRealize) Constructs aSpecificInstanceProcessorfor the specifiedClass.SpecificInstanceProcessor(Class<T> clzToRealize, AbstractEmptyElementProcessor.EmptyElementBehavior behavior) Constructs aSpecificInstanceProcessorfor the specifiedClass.SpecificInstanceProcessor(Class<T> clzToRealize, T oDefaultValue) Constructs aSpecificInstanceProcessorfor the specifiedClass. -
Method Summary
Modifier and TypeMethodDescriptiononProcess(ProcessingContext context, XmlElement xmlElement) Process anXmlElementto return a specific type of value.Methods inherited from class com.tangosol.coherence.config.xml.processor.AbstractEmptyElementProcessor
accepts, isEmptyElement, process
-
Constructor Details
-
SpecificInstanceProcessor
Constructs aSpecificInstanceProcessorfor the specifiedClass.- Parameters:
clzToRealize- the class that will be instantiated, injected and returned during processing
-
SpecificInstanceProcessor
public SpecificInstanceProcessor(Class<T> clzToRealize, AbstractEmptyElementProcessor.EmptyElementBehavior behavior) Constructs aSpecificInstanceProcessorfor the specifiedClass.- Parameters:
clzToRealize- the class that will be instantiated, injected and returned during processingbehavior- theAbstractEmptyElementProcessor.EmptyElementBehaviorwhen an emptyXmlElementis encountered
-
SpecificInstanceProcessor
Constructs aSpecificInstanceProcessorfor the specifiedClass.- Parameters:
clzToRealize- the class that will be instantiated, injected and returned during processingoDefaultValue- the value to return when an emptyXmlElementis encountered
-
-
Method Details
-
onProcess
Process anXmlElementto return a specific type of value.- Specified by:
onProcessin classAbstractEmptyElementProcessor<T>- Parameters:
context- theProcessingContextin which theXmlElementis being processedxmlElement- theXmlElementto process- Returns:
- a value of type T
- Throws:
ConfigurationException- when a configuration problem was encountered
-