org.springframework.cloud.zookeeper.serviceregistry.ZookeeperRegistration Java Examples
The following examples show how to use
org.springframework.cloud.zookeeper.serviceregistry.ZookeeperRegistration.
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: ServiceDefinitionToZookeeperRegistration.java From camel-spring-boot with Apache License 2.0 | 6 votes |
@Override public ZookeeperRegistration convert(ServiceDefinition source) { ZookeeperInstance instance = new ZookeeperInstance( source.getId(), source.getName(), source.getMetadata() ); return ServiceInstanceRegistration.builder() .address(properties.getServiceRegistry().getServiceHost()) .port(source.getPort()) .name(source.getName()) .payload(instance) .uriSpec(ZookeeperDiscoveryProperties.DEFAULT_URI_SPEC) .build(); }
Example #2
Source File: ServiceDefinitionToZookeeperRegistrationAutoConfiguration.java From camel-spring-boot with Apache License 2.0 | 4 votes |
@Bean(name = "service-definition-to-zookeeper-registration") public Converter<ServiceDefinition, ZookeeperRegistration> serviceDefinitionToZookeeperRegistration( CamelCloudConfigurationProperties properties) { return new ServiceDefinitionToZookeeperRegistration(properties); }