Class ServiceInstanceRegistration
java.lang.Object
org.springframework.cloud.zookeeper.serviceregistry.ServiceInstanceRegistration
- All Implemented Interfaces:
org.springframework.cloud.client.ServiceInstance,org.springframework.cloud.client.serviceregistry.Registration,ZookeeperRegistration
Registration that lazily
builds a ServiceInstance so the port can by dynamically set (for instance, when
the user wants a dynamic port for spring boot.- Author:
- Spencer Gibb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for ServiceInstanceRegistration. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance>protected org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> -
Constructor Summary
ConstructorsConstructorDescriptionServiceInstanceRegistration(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuild()builder()builder(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder) getHost()intgetPort()org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>getUri()booleanisSecure()voidsetPort(int port) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.cloud.client.ServiceInstance
getInstanceId, getScheme
-
Field Details
-
serviceInstance
-
builder
-
-
Constructor Details
-
ServiceInstanceRegistration
public ServiceInstanceRegistration(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder)
-
-
Method Details
-
builder
-
builder
public static ServiceInstanceRegistration.RegistrationBuilder builder(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder) -
getServiceInstance
- Specified by:
getServiceInstancein interfaceZookeeperRegistration
-
build
protected void build() -
getServiceId
- Specified by:
getServiceIdin interfaceorg.springframework.cloud.client.ServiceInstance
-
getPort
public int getPort()- Specified by:
getPortin interfaceorg.springframework.cloud.client.ServiceInstance
-
setPort
public void setPort(int port) - Specified by:
setPortin interfaceZookeeperRegistration
-
getHost
- Specified by:
getHostin interfaceorg.springframework.cloud.client.ServiceInstance
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceorg.springframework.cloud.client.ServiceInstance
-
getUri
- Specified by:
getUriin interfaceorg.springframework.cloud.client.ServiceInstance
-
getMetadata
- Specified by:
getMetadatain interfaceorg.springframework.cloud.client.ServiceInstance
-