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 XmlElements.- Since:
- Coherence 12.1.3
- Author:
- bo 2013.09.15
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe behavior of theConditionalElementProcessorwhen it encounters an emptyXmlElement. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs anAbstractEmptyElementProcessorthat will attempt to process emptyXmlElements.Constructs anAbstractEmptyElementProcessorwith the specified behavior for processing emptyXmlElements (with a default value ofnull).AbstractEmptyElementProcessor(T oDefaultValue) Constructs anAbstractEmptyElementProcessorthat will return the specified default value when it encounters an emptyXmlElement. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(ProcessingContext context, XmlElement xmlElement) Determines if the specifiedXmlElementshould be processed.protected booleanisEmptyElement(ProcessingContext context, XmlElement xmlElement) Determines if anXmlElementis considered empty.protected abstract TonProcess(ProcessingContext context, XmlElement xmlElement) Process anXmlElementto return a specific type of value.final Tprocess(ProcessingContext context, XmlElement xmlElement) Process anXmlElementto return a specific type of value.
-
Constructor Details
-
AbstractEmptyElementProcessor
public AbstractEmptyElementProcessor()Constructs anAbstractEmptyElementProcessorthat will attempt to process emptyXmlElements. -
AbstractEmptyElementProcessor
Constructs anAbstractEmptyElementProcessorwith the specified behavior for processing emptyXmlElements (with a default value ofnull).- Parameters:
behavior- the requiredAbstractEmptyElementProcessor.EmptyElementBehavior
-
AbstractEmptyElementProcessor
Constructs anAbstractEmptyElementProcessorthat 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 anXmlElementto return a specific type of value.- Parameters:
context- theProcessingContextin which theXmlElementis being processedxmlElement- theXmlElementto process- Returns:
- a value of type T
- Throws:
ConfigurationException- when a configuration problem was encountered
-
isEmptyElement
Determines if anXmlElementis considered empty.- Parameters:
context- theProcessingContextin which theXmlElementis being processedxmlElement- theXmlElementto process- Returns:
trueif theXmlElementis considered empty
-
accepts
public boolean accepts(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException Determines if the specifiedXmlElementshould be processed.- Specified by:
acceptsin interfaceConditionalElementProcessor<T>- Parameters:
context- theProcessingContextin which theXmlElementis being processedxmlElement- theXmlElementthat would be processed- Returns:
trueif theXmlElementshould be processed- Throws:
ConfigurationException- when a configuration problem was encountered
-
process
public final T process(ProcessingContext context, XmlElement xmlElement) throws ConfigurationException Process anXmlElementto return a specific type of value.- Specified by:
processin interfaceElementProcessor<T>- Parameters:
context- theProcessingContextin which theXmlElementis being processedxmlElement- theXmlElementto process- Returns:
- a value of type T
- Throws:
ConfigurationException- when a configuration problem was encountered
-