Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.coherence.config.xml.processor
Class AbstractEmptyElementProcessor

java.lang.Object
  extended by com.tangosol.coherence.config.xml.processor.AbstractEmptyElementProcessor

All Implemented Interfaces:
ConditionalElementProcessor, ElementProcessor
Direct Known Subclasses:
MemberListenerProcessor, MemorySizeProcessor, MillisProcessor, PartitionListenerProcessor, PersistenceProcessor, SerializerFactoryProcessor, ServiceFailurePolicyProcessor, SpecificInstanceProcessor

public abstract class AbstractEmptyElementProcessor
extends java.lang.Object
implements ConditionalElementProcessor

A ConditionalElementProcessor that provides defined behaviors for processing empty XmlElements.

Since:
Coherence 12.1.3
Author:
bo 2013.09.15

Nested Class Summary
static class AbstractEmptyElementProcessor.EmptyElementBehavior
          The behavior of the ConditionalElementProcessor when it encounters an empty XmlElement.

 

Constructor Summary
AbstractEmptyElementProcessor()
          Constructs an AbstractEmptyElementProcessor that will attempt to process empty XmlElements.
AbstractEmptyElementProcessor(AbstractEmptyElementProcessor.EmptyElementBehavior behavior)
          Constructs an AbstractEmptyElementProcessor with the specified behavior for processing empty XmlElements (with a default value of null).
AbstractEmptyElementProcessor(java.lang.Object oDefaultValue)
          Constructs an AbstractEmptyElementProcessor that will return the specified default value when it encounters an empty XmlElement.

 

Method Summary
 boolean accepts(ProcessingContext context, XmlElement xmlElement)
          Determines if the specified XmlElement should be processed.
protected  boolean isEmptyElement(ProcessingContext context, XmlElement xmlElement)
          Determines if an XmlElement is considered empty.
protected abstract  java.lang.Object onProcess(ProcessingContext context, XmlElement xmlElement)
          Process an XmlElement to return a specific type of value.
 java.lang.Object process(ProcessingContext context, XmlElement xmlElement)
          Process an XmlElement to return a specific type of value.

 

Constructor Detail

AbstractEmptyElementProcessor

public AbstractEmptyElementProcessor()
Constructs an AbstractEmptyElementProcessor that will attempt to process empty XmlElements.

AbstractEmptyElementProcessor

public AbstractEmptyElementProcessor(AbstractEmptyElementProcessor.EmptyElementBehavior behavior)
Constructs an AbstractEmptyElementProcessor with the specified behavior for processing empty XmlElements (with a default value of null).
Parameters:
behavior - the required AbstractEmptyElementProcessor.EmptyElementBehavior

AbstractEmptyElementProcessor

public AbstractEmptyElementProcessor(java.lang.Object oDefaultValue)
Constructs an AbstractEmptyElementProcessor that will return the specified default value when it encounters an empty XmlElement.
Parameters:
oDefaultValue - the default value to return

Method Detail

onProcess

protected abstract java.lang.Object onProcess(ProcessingContext context,
                                              XmlElement xmlElement)
                                       throws ConfigurationException
Process an XmlElement to return a specific type of value.
Parameters:
context - the ProcessingContext in which the XmlElement is being processed
xmlElement - the XmlElement to process
Returns:
a value of type T
Throws:
ConfigurationException - when a configuration problem was encountered

isEmptyElement

protected boolean isEmptyElement(ProcessingContext context,
                                 XmlElement xmlElement)
Determines if an XmlElement is considered empty.
Parameters:
context - the ProcessingContext in which the XmlElement is being processed
xmlElement - the XmlElement to process
Returns:
true if the XmlElement is considered empty

accepts

public boolean accepts(ProcessingContext context,
                       XmlElement xmlElement)
                throws ConfigurationException
Determines if the specified XmlElement should be processed.
Specified by:
accepts in interface ConditionalElementProcessor
Parameters:
context - the ProcessingContext in which the XmlElement is being processed
xmlElement - the XmlElement that would be processed
Returns:
true if the XmlElement should be processed
Throws:
ConfigurationException - when a configuration problem was encountered

process

public final java.lang.Object process(ProcessingContext context,
                                      XmlElement xmlElement)
                               throws ConfigurationException
Process an XmlElement to return a specific type of value.
Specified by:
process in interface ElementProcessor
Parameters:
context - the ProcessingContext in which the XmlElement is being processed
xmlElement - the XmlElement to process
Returns:
a value of type T
Throws:
ConfigurationException - when a configuration problem was encountered

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.