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>
public class SpecificInstanceProcessor<T> extends AbstractEmptyElementProcessor<T>
AnElementProcessorthat will process anXmlElementdefining aParameterizedBuilder, 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
Constructors Constructor Description SpecificInstanceProcessor(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TonProcess(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 Detail
-
SpecificInstanceProcessor
public SpecificInstanceProcessor(Class<T> clzToRealize)
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
public SpecificInstanceProcessor(Class<T> clzToRealize, T oDefaultValue)
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 Detail
-
onProcess
public T onProcess(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException
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
-
-