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
ConstructorDescriptionSpecificInstanceProcessor
(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
Modifier and TypeMethodDescriptiononProcess
(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 Details
-
SpecificInstanceProcessor
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
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 Details
-
onProcess
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
-