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>
AnElementProcessor
that will process anXmlElement
defining 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 aSpecificInstanceProcessor
for the specifiedClass
.SpecificInstanceProcessor(Class<T> clzToRealize, AbstractEmptyElementProcessor.EmptyElementBehavior behavior)
Constructs aSpecificInstanceProcessor
for the specifiedClass
.SpecificInstanceProcessor(Class<T> clzToRealize, T oDefaultValue)
Constructs aSpecificInstanceProcessor
for the specifiedClass
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
onProcess(ProcessingContext context, XmlElement xmlElement)
Process anXmlElement
to 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 aSpecificInstanceProcessor
for 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 aSpecificInstanceProcessor
for the specifiedClass
.- Parameters:
clzToRealize
- the class that will be instantiated, injected and returned during processingbehavior
- theAbstractEmptyElementProcessor.EmptyElementBehavior
when an emptyXmlElement
is encountered
-
SpecificInstanceProcessor
public SpecificInstanceProcessor(Class<T> clzToRealize, T oDefaultValue)
Constructs aSpecificInstanceProcessor
for the specifiedClass
.- Parameters:
clzToRealize
- the class that will be instantiated, injected and returned during processingoDefaultValue
- the value to return when an emptyXmlElement
is encountered
-
-
Method Detail
-
onProcess
public T onProcess(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException
Process anXmlElement
to return a specific type of value.- Specified by:
onProcess
in classAbstractEmptyElementProcessor<T>
- Parameters:
context
- theProcessingContext
in which theXmlElement
is being processedxmlElement
- theXmlElement
to process- Returns:
- a value of type T
- Throws:
ConfigurationException
- when a configuration problem was encountered
-
-