當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。