本文整理汇总了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);
}
示例2: getCamelJMXAgent
import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public CamelJMXAgentDefinition getCamelJMXAgent() {
return camelJMXAgent;
}
示例3: setCamelJMXAgent
import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public void setCamelJMXAgent(CamelJMXAgentDefinition camelJMXAgent) {
this.camelJMXAgent = camelJMXAgent;
}
示例4: setCamelJMXAgent
import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
public void setCamelJMXAgent(CamelJMXAgentDefinition agent) {
camelJMXAgent = agent;
}
示例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));
}
示例6: getCamelJMXAgent
import org.apache.camel.core.xml.CamelJMXAgentDefinition; //导入依赖的package包/类
@Override
public CamelJMXAgentDefinition getCamelJMXAgent() {
return _factoryBean.getCamelJMXAgent();
}