Examples of CamelBus


Examples of org.jboss.soa.esb.listeners.config.xbeanmodel130.CamelBusDocument.CamelBus

        final Element gatewayNode = YADOMUtil.addElement(root, "listener");

        gatewayNode.setAttribute("name", gateway.getName());
        gatewayNode.setAttribute("gatewayClass", CamelGateway.class.getName());
       
        final CamelBus bus;
        try {
            bus = (CamelBus)model.getOptionalBus(gateway.getBusidref());
        } catch (ClassCastException e) {
            throw new ConfigurationException("Invalid busid reference [" + gateway.getBusidref() + "] on gateway [" + gateway.getName() + "].  A <camel-gateway> must reference a <camel-bus>.");
        }
       
        List<String> routeXMLs = new ArrayList<String>();
       
        URI toURI = createToURI(gateway, bus, model);  
       
        if (bus != null) {
            try {
              // <camel-bus from-uri="">
              if (bus.isSetFromUri()) {
                URI busFromURI = createURI(bus.getFromUri());
                addRouteXML(busFromURI, toURI, routeXMLs);
              }
                // <camel-bus><from uri="">*
                for (From busFrom : bus.getFromList()) {
                  URI fromURI = createURI(busFrom.getUri());
                  addRouteXML(fromURI, toURI, routeXMLs);
                }
            } catch (ClassCastException e) {
                throw new ConfigurationException("Invalid bus config [" + gateway.getBusidref() + "].  Should be contained within a <camel-provider> instance.  Unexpected exception - this should have caused a validation error!");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.