当前位置: 首页>>代码示例>>Java>>正文


Java CamelEndpointFactoryBean类代码示例

本文整理汇总了Java中org.apache.camel.spring.CamelEndpointFactoryBean的典型用法代码示例。如果您正苦于以下问题:Java CamelEndpointFactoryBean类的具体用法?Java CamelEndpointFactoryBean怎么用?Java CamelEndpointFactoryBean使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CamelEndpointFactoryBean类属于org.apache.camel.spring包,在下文中一共展示了CamelEndpointFactoryBean类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadSchemas

import org.apache.camel.spring.CamelEndpointFactoryBean; //导入依赖的package包/类
private static void loadSchemas(SchemaFinder loader) throws SAXException, IOException {
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);

    XsdDetails[] xsds = new XsdDetails[]{
            new XsdDetails("camel-spring.xsd", "http://camel.apache.org/schema/spring/camel-spring.xsd", CamelEndpointFactoryBean.class),
            new XsdDetails("camel-blueprint.xsd", "http://camel.apache.org/schema/blueprint/camel-blueprint.xsd", org.apache.camel.blueprint.CamelEndpointFactoryBean.class)
    };

    List<Source> sources = new ArrayList<Source>(xsds.length);

    for (XsdDetails xsdd : xsds) {
        URL url = loader.findSchema(xsdd);
        if (url != null) {
            sources.add(new StreamSource(url.openStream(), xsdd.getUri()));
        } else {
            System.out.println("Warning could not find local resource " + xsdd.getPath() + " on classpath");
            sources.add(new StreamSource(xsdd.getUri()));
        }
    }

    _schema = factory.newSchema(sources.toArray(new Source[sources.size()]));
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:23,代码来源:CamelNamespaces.java

示例2: doParse

import org.apache.camel.spring.CamelEndpointFactoryBean; //导入依赖的package包/类
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
    doBeforeParse(element);
    super.doParse(element, parserContext, builder);

    // now lets parse the routes with JAXB
    Binder<Node> binder;
    try {
        binder = getJaxbContext().createBinder();
    } catch (JAXBException e) {
        throw new BeanDefinitionStoreException("Failed to create the JAXB binder", e);
    }
    Object value = parseUsingJaxb(element, parserContext, binder);

    if (value instanceof CamelEndpointFactoryBean) {
        CamelEndpointFactoryBean factoryBean = (CamelEndpointFactoryBean) value;
        builder.addPropertyValue("properties", factoryBean.getProperties());
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:CamelNamespaceHandler.java

示例3: processCamelContextElement

import org.apache.camel.spring.CamelEndpointFactoryBean; //导入依赖的package包/类
private static List<RouteDefinition> processCamelContextElement(CamelContextFactoryBean camelContextFactoryBean, SwitchYardCamelContext camelContext) throws Exception {
    if (camelContext != null) {
        if (camelContextFactoryBean.getEndpoints() != null) {
            // processing camelContext/endpoint
            for (CamelEndpointFactoryBean epBean : camelContextFactoryBean.getEndpoints()) {
                epBean.setCamelContext(camelContext);
                camelContext.getWritebleRegistry().put(epBean.getId(), epBean.getObject());
            }
        }
        if (camelContextFactoryBean.getDataFormats() != null) {
            // processing camelContext/dataFormat
            for (DataFormatDefinition dataFormatDef : camelContextFactoryBean.getDataFormats().getDataFormats()) {
                camelContext.getDataFormats().put(dataFormatDef.getId(), dataFormatDef);
            }
        }
    }
    return camelContextFactoryBean.getRoutes();
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:19,代码来源:RouteFactory.java

示例4: EndpointDefinitionParser

import org.apache.camel.spring.CamelEndpointFactoryBean; //导入依赖的package包/类
public EndpointDefinitionParser() {
    super(CamelEndpointFactoryBean.class, false);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:CamelNamespaceHandler.java

示例5: getEndpoints

import org.apache.camel.spring.CamelEndpointFactoryBean; //导入依赖的package包/类
@Override
public List<CamelEndpointFactoryBean> getEndpoints() {
    return _factoryBean.getEndpoints();
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:CamelContextFactoryBeanDelegate.java


注:本文中的org.apache.camel.spring.CamelEndpointFactoryBean类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。