本文整理匯總了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();
}