org.apache.dubbo.config.ConsumerConfig Java Examples
The following examples show how to use
org.apache.dubbo.config.ConsumerConfig.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DubboConfigsMetadata.java From dubbo-spring-boot-project with Apache License 2.0 | 6 votes |
public Map<String, Map<String, Map<String, Object>>> configs() { Map<String, Map<String, Map<String, Object>>> configsMap = new LinkedHashMap<>(); addDubboConfigBeans(ApplicationConfig.class, configsMap); addDubboConfigBeans(ConsumerConfig.class, configsMap); addDubboConfigBeans(MethodConfig.class, configsMap); addDubboConfigBeans(ModuleConfig.class, configsMap); addDubboConfigBeans(MonitorConfig.class, configsMap); addDubboConfigBeans(ProtocolConfig.class, configsMap); addDubboConfigBeans(ProviderConfig.class, configsMap); addDubboConfigBeans(ReferenceConfig.class, configsMap); addDubboConfigBeans(RegistryConfig.class, configsMap); addDubboConfigBeans(ServiceConfig.class, configsMap); return configsMap; }
Example #2
Source File: DubboProxyService.java From bird-java with MIT License | 5 votes |
private ConsumerConfig getConsumer(final DubboHandle dubboHandle){ String appName = dubboHandle.getAppName(); Integer timeout = dubboHandle.getTimeout(); ConsumerConfig consumerConfig = new ConsumerConfig(); consumerConfig.setTimeout(timeout); consumerConfig.setRetries(0); consumerConfig.setLoadbalance(dubboHandle.getLoadBalance()); consumerConfig.setCluster("failfast"); consumerConfig.setFilter("consumerSession"); return consumerConfig; }
Example #3
Source File: DubboConfigurationProperties.java From dubbo-spring-boot-project with Apache License 2.0 | 4 votes |
public ConsumerConfig getConsumer() { return consumer; }
Example #4
Source File: DubboConfigurationProperties.java From dubbo-spring-boot-project with Apache License 2.0 | 4 votes |
public void setConsumer(ConsumerConfig consumer) { this.consumer = consumer; }
Example #5
Source File: DubboConfigurationProperties.java From dubbo-spring-boot-project with Apache License 2.0 | 4 votes |
public Map<String, ConsumerConfig> getConsumers() { return consumers; }
Example #6
Source File: DubboConfigurationProperties.java From dubbo-spring-boot-project with Apache License 2.0 | 4 votes |
public void setConsumers(Map<String, ConsumerConfig> consumers) { this.consumers = consumers; }
Example #7
Source File: DubboAutoConfigurationOnMultipleConfigTest.java From dubbo-spring-boot-project with Apache License 2.0 | 4 votes |
@Test public void testApplicationContext() { /** * Multiple {@link ApplicationConfig} */ Map<String, ApplicationConfig> applications = beansOfTypeIncludingAncestors(applicationContext, ApplicationConfig.class); Assert.assertEquals(1, applications.size()); /** * Multiple {@link ModuleConfig} */ Map<String, ModuleConfig> modules = beansOfTypeIncludingAncestors(applicationContext, ModuleConfig.class); Assert.assertEquals(1, modules.size()); /** * Multiple {@link RegistryConfig} */ Map<String, RegistryConfig> registries = beansOfTypeIncludingAncestors(applicationContext, RegistryConfig.class); Assert.assertEquals(1, registries.size()); /** * Multiple {@link ProtocolConfig} */ Map<String, ProtocolConfig> protocols = beansOfTypeIncludingAncestors(applicationContext, ProtocolConfig.class); Assert.assertEquals(1, protocols.size()); /** * Multiple {@link MonitorConfig} */ Map<String, MonitorConfig> monitors = beansOfTypeIncludingAncestors(applicationContext, MonitorConfig.class); Assert.assertEquals(1, monitors.size()); /** * Multiple {@link ProviderConfig} */ Map<String, ProviderConfig> providers = beansOfTypeIncludingAncestors(applicationContext, ProviderConfig.class); Assert.assertEquals(1, providers.size()); /** * Multiple {@link ConsumerConfig} */ Map<String, ConsumerConfig> consumers = beansOfTypeIncludingAncestors(applicationContext, ConsumerConfig.class); Assert.assertEquals(1, consumers.size()); }