public class ParserRegistry extends Object implements NamespaceMappingParser
ConfigurationParser
interface. A registry of available parsers is built using the
ServiceLoader
system. Implementations of ConfigurationParser
should include a
META-INF/services/org.infinispan.configuration.parsing.ConfigurationParser file containing a list
of available parsers.Constructor and Description |
---|
ParserRegistry() |
ParserRegistry(ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
ConfigurationBuilderHolder |
parse(InputStream is) |
void |
parse(InputStream is,
ConfigurationBuilderHolder holder) |
void |
parse(XMLExtendedStreamReader reader,
ConfigurationBuilderHolder holder) |
void |
parseElement(XMLExtendedStreamReader reader,
ConfigurationBuilderHolder holder)
Recursively parses the current element of an XML stream using an appropriate
ConfigurationParser depending on the element's namespace. |
ConfigurationBuilderHolder |
parseFile(String filename) |
public ParserRegistry()
public ParserRegistry(ClassLoader classLoader)
public ConfigurationBuilderHolder parseFile(String filename) throws IOException
IOException
public ConfigurationBuilderHolder parse(InputStream is)
public void parse(InputStream is, ConfigurationBuilderHolder holder) throws XMLStreamException
XMLStreamException
public void parse(XMLExtendedStreamReader reader, ConfigurationBuilderHolder holder) throws XMLStreamException
XMLStreamException
public void parseElement(XMLExtendedStreamReader reader, ConfigurationBuilderHolder holder) throws XMLStreamException
NamespaceMappingParser
ConfigurationParser
depending on the element's namespace.parseElement
in interface NamespaceMappingParser
reader
- the XML stream readerholder
- a configuration holderXMLStreamException
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.