use of org.apache.dubbo.config.RegistryConfig in project dubbo by alibaba.
the class InvokerSideConfigUrlTest method initRefConf.
// ======================================================
// private helper
// ======================================================
private void initRefConf() {
regConfForConsumer = new RegistryConfig();
regConfForReference = new RegistryConfig();
methodConfForReference = new MethodConfig();
refConf = new ReferenceConfig<DemoService>();
consumerConf = new ConsumerConfig();
methodConfForReference.setName("sayName");
regConfForReference.setAddress("127.0.0.1:9090");
regConfForReference.setProtocol("mockregistry");
refConf.setInterface("org.apache.dubbo.config.api.DemoService");
refConf.setApplication(application);
// consumerConf.setApplication(appConfForConsumer);
refConf.setRegistry(regConfForReference);
consumerConf.setRegistry(regConfForConsumer);
refConf.setConsumer(consumerConf);
refConf.setMethods(Arrays.asList(new MethodConfig[] { methodConfForReference }));
refConf.setScope(SCOPE_REMOTE);
}
use of org.apache.dubbo.config.RegistryConfig in project dubbo by alibaba.
the class ReferenceConfigCacheTest method buildXxxMockReferenceConfig.
private XxxMockReferenceConfig buildXxxMockReferenceConfig(String service, String group, String version) {
XxxMockReferenceConfig config = new XxxMockReferenceConfig();
config.setApplication(new ApplicationConfig("cache"));
config.setRegistry(new RegistryConfig("multicast://224.5.6.7:1234"));
config.setInterface(service);
config.setCheck(false);
config.setGroup(group);
config.setVersion(version);
return config;
}
use of org.apache.dubbo.config.RegistryConfig in project dubbo by alibaba.
the class MetadataServiceExporterTest method init.
@BeforeAll
public static void init() {
ApplicationModel.reset();
ApplicationModel.getConfigManager().setApplication(new ApplicationConfig("Test"));
ApplicationModel.getConfigManager().addRegistry(new RegistryConfig("test://1.2.3.4"));
ApplicationModel.getConfigManager().addProtocol(new ProtocolConfig("injvm"));
}
use of org.apache.dubbo.config.RegistryConfig in project dubbo by alibaba.
the class ServiceAnnotationTestConfiguration2 method registryConfig.
/**
* Current registry center configuration, to replace XML config:
* <prev>
* <dubbo:registry id="my-registry" address="N/A"/>
* </prev>
*
* @return {@link RegistryConfig} Bean
*/
@Bean("my-registry")
public RegistryConfig registryConfig() {
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("N/A");
return registryConfig;
}
use of org.apache.dubbo.config.RegistryConfig in project dubbo by alibaba.
the class ServiceAnnotationTestConfiguration method registryConfig.
/**
* Current registry center configuration, to replace XML config:
* <prev>
* <dubbo:registry id="my-registry" address="N/A"/>
* </prev>
*
* @return {@link RegistryConfig} Bean
*/
@Bean("my-registry")
public RegistryConfig registryConfig() {
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("N/A");
return registryConfig;
}
Aggregations