public class ServiceInstanceRegistration extends Object implements 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.| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceInstanceRegistration.RegistrationBuilder |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> |
builder |
protected org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> |
serviceInstance |
| Constructor and Description |
|---|
ServiceInstanceRegistration(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
build() |
static ServiceInstanceRegistration.RegistrationBuilder |
builder() |
static ServiceInstanceRegistration.RegistrationBuilder |
builder(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder) |
int |
getPort() |
String |
getServiceId() |
org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> |
getServiceInstance() |
void |
setPort(int port) |
protected org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> serviceInstance
protected org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder
public ServiceInstanceRegistration(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder)
public static ServiceInstanceRegistration.RegistrationBuilder builder()
public static ServiceInstanceRegistration.RegistrationBuilder builder(org.apache.curator.x.discovery.ServiceInstanceBuilder<ZookeeperInstance> builder)
public org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> getServiceInstance()
getServiceInstance in interface ZookeeperRegistrationprotected void build()
public String getServiceId()
getServiceId in interface org.springframework.cloud.client.serviceregistry.Registrationpublic int getPort()
getPort in interface ZookeeperRegistrationpublic void setPort(int port)
setPort in interface ZookeeperRegistrationCopyright © 2017 Pivotal Software, Inc.. All rights reserved.