org.springframework.cloud.client.serviceregistry.ServiceRegistry Java Examples

The following examples show how to use org.springframework.cloud.client.serviceregistry.ServiceRegistry. 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: EurekaMgmtEndpointAutoConfiguration.java    From summerframework with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnEnabledEndpoint
public EurekaMgmtEndpoint serviceDiscoveryMgmtEndpoint(ServiceRegistry serviceRegistry,
    Environment environment) {
    EurekaMgmtEndpoint endpoint = new EurekaMgmtEndpoint(serviceRegistry);
    endpoint.setRegistration(registration);
    JmxEndpointProperties r;
    return endpoint;
}
 
Example #2
Source File: StubRunnerSpringCloudEurekaAutoConfiguration.java    From spring-cloud-contract with Apache License 2.0 5 votes vote down vote up
@Bean(initMethod = "registerStubs")
public StubsRegistrar stubsRegistrar(StubRunning stubRunning,
		ServiceRegistry<EurekaRegistration> serviceRegistry,
		ApplicationContext context, StubMapperProperties stubMapperProperties,
		InetUtils inetUtils, EurekaInstanceConfigBean eurekaInstanceConfigBean,
		EurekaClientConfigBean eurekaClientConfigBean) {
	return new EurekaStubsRegistrar(stubRunning, serviceRegistry,
			stubMapperProperties, inetUtils, eurekaInstanceConfigBean,
			eurekaClientConfigBean, context);
}
 
Example #3
Source File: EurekaStubsRegistrar.java    From spring-cloud-contract with Apache License 2.0 5 votes vote down vote up
public EurekaStubsRegistrar(StubRunning stubRunning,
		ServiceRegistry<EurekaRegistration> serviceRegistry,
		StubMapperProperties stubMapperProperties, InetUtils inetUtils,
		EurekaInstanceConfigBean eurekaInstanceConfigBean,
		EurekaClientConfigBean eurekaClientConfigBean, ApplicationContext context) {
	this.stubRunning = stubRunning;
	this.stubMapperProperties = stubMapperProperties;
	this.serviceRegistry = serviceRegistry;
	this.inetUtils = inetUtils;
	this.eurekaInstanceConfigBean = eurekaInstanceConfigBean;
	this.eurekaClientConfigBean = eurekaClientConfigBean;
	this.context = context;
}
 
Example #4
Source File: CamelSpringCloudServiceRegistry.java    From camel-spring-boot with Apache License 2.0 4 votes vote down vote up
public CamelSpringCloudServiceRegistry(Collection<ConversionService> conversionServices, ServiceRegistry serviceRegistry) {
    this.definitions = new ArrayList<>();
    this.conversionServices = new ArrayList<>(conversionServices);
    this.serviceRegistry = serviceRegistry;
    this.registrationType = determineRegistrationType("register");
}
 
Example #5
Source File: CamelSpringCloudServiceRegistry.java    From camel-spring-boot with Apache License 2.0 4 votes vote down vote up
public ServiceRegistry getNativeServiceRegistry() {
    return this.serviceRegistry;
}
 
Example #6
Source File: CamelSpringCloudServiceRegistry.java    From camel-spring-boot with Apache License 2.0 4 votes vote down vote up
public <R extends Registration, T extends ServiceRegistry<R>> T getNativeServiceRegistry(Class<T> type) {
    return type.cast(this.serviceRegistry);
}
 
Example #7
Source File: MossNacosAutoServiceRegistration.java    From Moss with Apache License 2.0 4 votes vote down vote up
public MossNacosAutoServiceRegistration(ServiceRegistry<NacosRegistration> serviceRegistry,
                                        AutoServiceRegistrationProperties autoServiceRegistrationProperties, NacosRegistration registration, NacosRegistration registration1) {
    super(serviceRegistry, autoServiceRegistrationProperties, registration);
    this.registration = registration1;
}
 
Example #8
Source File: EurekaServiceRegistryWrapper.java    From summerframework with Apache License 2.0 4 votes vote down vote up
public EurekaServiceRegistryWrapper(ServiceRegistry<EurekaRegistration> serviceRegistry,
    ConfigurableEnvironment environment) {
    this.serviceRegistry = serviceRegistry;
    this.environment = environment;
}
 
Example #9
Source File: EurekaMgmtEndpoint.java    From summerframework with Apache License 2.0 4 votes vote down vote up
public EurekaMgmtEndpoint(ServiceRegistry serviceRegistry) {
    this.serviceRegistry = serviceRegistry;
}
 
Example #10
Source File: DefaultInstanceDiscoveryClient.java    From spring-cloud-gray with Apache License 2.0 4 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception {
    registration = applicationContext.getBean(Registration.class);
    serviceRegistry = applicationContext.getBean(ServiceRegistry.class);
}
 
Example #11
Source File: NacosAutoServiceRegistration.java    From spring-cloud-alibaba with Apache License 2.0 4 votes vote down vote up
public NacosAutoServiceRegistration(ServiceRegistry<Registration> serviceRegistry,
		AutoServiceRegistrationProperties autoServiceRegistrationProperties,
		NacosRegistration registration) {
	super(serviceRegistry, autoServiceRegistrationProperties);
	this.registration = registration;
}
 
Example #12
Source File: ServiceRegistryEndpoint.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
public ServiceRegistryEndpoint(ServiceRegistry<?> serviceRegistry) {
	this.serviceRegistry = serviceRegistry;
}
 
Example #13
Source File: ServiceRegistryEndpointTests.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
@Bean
ServiceRegistry serviceRegistry() {
	return new TestServiceRegistry();
}
 
Example #14
Source File: ServiceRegistryEndpointNoRegistrationTests.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
@Bean
ServiceRegistry serviceRegistry() {
	return new TestServiceRegistry();
}