Class ModelParserXMLRoutesDefinitionLoader

  • All Implemented Interfaces:
    org.apache.camel.spi.XMLRoutesDefinitionLoader

    @JdkService("xmlroutes-loader")
    public class ModelParserXMLRoutesDefinitionLoader
    extends Object
    implements org.apache.camel.spi.XMLRoutesDefinitionLoader
    XMLRoutesDefinitionLoader that uses ModelParser to load and parse the routes from XML which is fast and light-weight compared to the default that uses JAXB.
    • Constructor Detail

      • ModelParserXMLRoutesDefinitionLoader

        public ModelParserXMLRoutesDefinitionLoader()
    • Method Detail

      • loadRoutesDefinition

        public Object loadRoutesDefinition​(org.apache.camel.CamelContext context,
                                           InputStream inputStream)
                                    throws Exception
        Specified by:
        loadRoutesDefinition in interface org.apache.camel.spi.XMLRoutesDefinitionLoader
        Throws:
        Exception
      • loadRestsDefinition

        public Object loadRestsDefinition​(org.apache.camel.CamelContext context,
                                          InputStream inputStream)
                                   throws Exception
        Specified by:
        loadRestsDefinition in interface org.apache.camel.spi.XMLRoutesDefinitionLoader
        Throws:
        Exception
      • createModelFromXml

        public <T extends org.apache.camel.NamedNode> T createModelFromXml​(org.apache.camel.CamelContext context,
                                                                           String xml,
                                                                           Class<T> type)
                                                                    throws Exception
        Specified by:
        createModelFromXml in interface org.apache.camel.spi.XMLRoutesDefinitionLoader
        Throws:
        Exception