com.tangosol.coherence.config.xml.processor.SerializerBuilderProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of coherence Show documentation
Show all versions of coherence Show documentation
Oracle Coherence Community Edition
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.coherence.config.xml.processor;
import com.tangosol.coherence.config.builder.ParameterizedBuilder;
import com.tangosol.config.ConfigurationException;
import com.tangosol.config.xml.ProcessingContext;
import com.tangosol.config.xml.XmlSimpleName;
import com.tangosol.io.Serializer;
import com.tangosol.run.xml.XmlElement;
/**
* An {@link com.tangosol.config.xml.ElementProcessor} for <serializer> elements defined by
* a Coherence Operational Configuration file.
*
* @author jf 2015.03.03
* @since Coherence 12.2.1
*/
@XmlSimpleName("serializer")
public class SerializerBuilderProcessor
extends AbstractEmptyElementProcessor>
{
// ----- constructors ---------------------------------------------------
/**
* Constructs a {@link com.tangosol.coherence.config.xml.processor.SerializerBuilderProcessor}.
*/
public SerializerBuilderProcessor()
{
super(EmptyElementBehavior.IGNORE);
}
// ----- AbstractEmptyElementProcessor methods --------------------------
@Override
public ParameterizedBuilder onProcess(ProcessingContext context, XmlElement xmlElement)
throws ConfigurationException
{
// assume the contains a builder definition
ParameterizedBuilder bldr = ElementProcessorHelper.processParameterizedBuilder(context, xmlElement);
if (bldr == null)
{
throw new ConfigurationException(" fails to correctly define a ParameterizedBuilder implementation: "
+ xmlElement, "Please define a ");
}
return (ParameterizedBuilder) bldr;
}
}