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) |
String |
getHost() |
Map<String,String> |
getMetadata() |
int |
getPort() |
String |
getServiceId() |
org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> |
getServiceInstance() |
URI |
getUri() |
boolean |
isSecure() |
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 ZookeeperRegistration
protected void build()
public String getServiceId()
getServiceId
in interface org.springframework.cloud.client.ServiceInstance
public int getPort()
getPort
in interface org.springframework.cloud.client.ServiceInstance
public void setPort(int port)
setPort
in interface ZookeeperRegistration
public String getHost()
getHost
in interface org.springframework.cloud.client.ServiceInstance
public boolean isSecure()
isSecure
in interface org.springframework.cloud.client.ServiceInstance
public URI getUri()
getUri
in interface org.springframework.cloud.client.ServiceInstance
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.