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


Java CamelJMXAgentDefinition类代码示例

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


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

示例1: canPostProcessBean

import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
@Override
public boolean canPostProcessBean(Object bean, String beanName) {
    // the JMXAgent is a bit strange and causes Spring issues if we let it being
    // post processed by this one. It does not need it anyway so we are good to go.
    // We should also avoid to process the null object bean (in Spring 2.5.x)
    if (bean == null || bean instanceof CamelJMXAgentDefinition) {
        return false;
    }

    return super.canPostProcessBean(bean, beanName);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:CamelBeanPostProcessor.java

示例2: getCamelJMXAgent

import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public CamelJMXAgentDefinition getCamelJMXAgent() {
    return camelJMXAgent;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:CamelContextFactoryBean.java

示例3: setCamelJMXAgent

import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public void setCamelJMXAgent(CamelJMXAgentDefinition camelJMXAgent) {
    this.camelJMXAgent = camelJMXAgent;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:CamelContextFactoryBean.java

示例4: setCamelJMXAgent

import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public void setCamelJMXAgent(CamelJMXAgentDefinition agent) {
    camelJMXAgent = agent;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:CamelContextFactoryBean.java

示例5: init

import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public void init() {
    // register restContext parser
    registerParser("restContext", new RestContextDefinitionParser());
    // register routeContext parser
    registerParser("routeContext", new RouteContextDefinitionParser());
    // register endpoint parser
    registerParser("endpoint", endpointParser);

    addBeanDefinitionParser("keyStoreParameters", KeyStoreParametersFactoryBean.class, true, true);
    addBeanDefinitionParser("secureRandomParameters", SecureRandomParametersFactoryBean.class, true, true);
    registerBeanDefinitionParser("sslContextParameters", new SSLContextParametersFactoryBeanBeanDefinitionParser());

    addBeanDefinitionParser("proxy", CamelProxyFactoryBean.class, true, false);
    addBeanDefinitionParser("template", CamelProducerTemplateFactoryBean.class, true, false);
    addBeanDefinitionParser("consumerTemplate", CamelConsumerTemplateFactoryBean.class, true, false);
    addBeanDefinitionParser("export", CamelServiceExporter.class, true, false);
    addBeanDefinitionParser("threadPool", CamelThreadPoolFactoryBean.class, true, true);
    addBeanDefinitionParser("redeliveryPolicyProfile", CamelRedeliveryPolicyFactoryBean.class, true, true);

    // jmx agent, stream caching, hystrix, service call configurations and property placeholder cannot be used outside of the camel context
    addBeanDefinitionParser("jmxAgent", CamelJMXAgentDefinition.class, false, false);
    addBeanDefinitionParser("streamCaching", CamelStreamCachingStrategyDefinition.class, false, false);
    addBeanDefinitionParser("propertyPlaceholder", CamelPropertyPlaceholderDefinition.class, false, false);
    addBeanDefinitionParser("hystrixConfiguration", HystrixConfigurationDefinition.class, false, false);
    addBeanDefinitionParser("consulConfiguration", ConsulConfigurationDefinition.class, false, false);
    addBeanDefinitionParser("dnsConfiguration", DnsConfigurationDefinition.class, false, false);
    addBeanDefinitionParser("etcdConfiguration", EtcdConfigurationDefinition.class, false, false);
    addBeanDefinitionParser("kubernetesConfiguration", KubernetesConfigurationDefinition.class, false, false);
    addBeanDefinitionParser("ribbonConfiguration", RibbonConfigurationDefinition.class, false, false);

    // errorhandler could be the sub element of camelContext or defined outside camelContext
    BeanDefinitionParser errorHandlerParser = new ErrorHandlerDefinitionParser();
    registerParser("errorHandler", errorHandlerParser);
    parserMap.put("errorHandler", errorHandlerParser);

    // camel context
    boolean osgi = false;
    Class<?> cl = CamelContextFactoryBean.class;
    // These code will try to detected if we are in the OSGi environment.
    // If so, camel will use the OSGi version of CamelContextFactoryBean to create the CamelContext.
    try {
        // Try to load the BundleActivator first
        Class.forName("org.osgi.framework.BundleActivator");
        Class<?> c = Class.forName("org.apache.camel.osgi.Activator");
        Method mth = c.getDeclaredMethod("getBundle");
        Object bundle = mth.invoke(null);
        if (bundle != null) {
            cl = Class.forName("org.apache.camel.osgi.CamelContextFactoryBean");
            osgi = true;
        }
    } catch (Throwable t) {
        // not running with camel-core-osgi so we fallback to the regular factory bean
        LOG.trace("Cannot find class so assuming not running in OSGi container: " + t.getMessage());
    }
    if (osgi) {
        LOG.info("OSGi environment detected.");
    } 
    LOG.debug("Using {} as CamelContextBeanDefinitionParser", cl.getCanonicalName());
    registerParser("camelContext", new CamelContextBeanDefinitionParser(cl));
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:61,代码来源:CamelNamespaceHandler.java

示例6: getCamelJMXAgent

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


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