Class AbstractEmptyElementProcessor<T>
java.lang.Object
com.tangosol.coherence.config.xml.processor.AbstractEmptyElementProcessor<T>
- All Implemented Interfaces:
ConditionalElementProcessor<T>
,ElementProcessor<T>
- Direct Known Subclasses:
EnumProcessor
,MemberListenerProcessor
,MemorySizeProcessor
,MillisProcessor
,PartitionListenerProcessor
,PasswordProviderBuilderProcessor
,PersistenceEnvironmentsProcessor.PersistenceEnvironmentProcessor
,PersistenceProcessor
,ResourceBuilderProcessor
,SerializerBuilderProcessor
,SerializerFactoryProcessor
,ServiceFailurePolicyProcessor
,SimpleBuilderProcessor
,SpecificInstanceProcessor
,StorageAccessAuthorizerBuilderProcessor
public abstract class AbstractEmptyElementProcessor<T>
extends Object
implements ConditionalElementProcessor<T>
A
ConditionalElementProcessor
that provides defined behaviors
for processing empty XmlElement
s.- Since:
- Coherence 12.1.3
- Author:
- bo 2013.09.15
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The behavior of theConditionalElementProcessor
when it encounters an emptyXmlElement
. -
Constructor Summary
ConstructorDescriptionConstructs anAbstractEmptyElementProcessor
that will attempt to process emptyXmlElement
s.Constructs anAbstractEmptyElementProcessor
with the specified behavior for processing emptyXmlElement
s (with a default value ofnull
).AbstractEmptyElementProcessor
(T oDefaultValue) Constructs anAbstractEmptyElementProcessor
that will return the specified default value when it encounters an emptyXmlElement
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(ProcessingContext context, XmlElement xmlElement) Determines if the specifiedXmlElement
should be processed.protected boolean
isEmptyElement
(ProcessingContext context, XmlElement xmlElement) Determines if anXmlElement
is considered empty.protected abstract T
onProcess
(ProcessingContext context, XmlElement xmlElement) Process anXmlElement
to return a specific type of value.final T
process
(ProcessingContext context, XmlElement xmlElement) Process anXmlElement
to return a specific type of value.
-
Constructor Details
-
AbstractEmptyElementProcessor
public AbstractEmptyElementProcessor()Constructs anAbstractEmptyElementProcessor
that will attempt to process emptyXmlElement
s. -
AbstractEmptyElementProcessor
Constructs anAbstractEmptyElementProcessor
with the specified behavior for processing emptyXmlElement
s (with a default value ofnull
).- Parameters:
behavior
- the requiredAbstractEmptyElementProcessor.EmptyElementBehavior
-
AbstractEmptyElementProcessor
Constructs anAbstractEmptyElementProcessor
that will return the specified default value when it encounters an emptyXmlElement
.- Parameters:
oDefaultValue
- the default value to return
-
-
Method Details
-
onProcess
protected abstract T onProcess(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException Process anXmlElement
to return a specific type of value.- 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
-
isEmptyElement
Determines if anXmlElement
is considered empty.- Parameters:
context
- theProcessingContext
in which theXmlElement
is being processedxmlElement
- theXmlElement
to process- Returns:
true
if theXmlElement
is considered empty
-
accepts
public boolean accepts(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException Determines if the specifiedXmlElement
should be processed.- Specified by:
accepts
in interfaceConditionalElementProcessor<T>
- Parameters:
context
- theProcessingContext
in which theXmlElement
is being processedxmlElement
- theXmlElement
that would be processed- Returns:
true
if theXmlElement
should be processed- Throws:
ConfigurationException
- when a configuration problem was encountered
-
process
public final T process(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException Process anXmlElement
to return a specific type of value.- Specified by:
process
in interfaceElementProcessor<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
-