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
A builder for ServiceInstanceRegistration.
|
| 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 ZookeeperRegistrationprotected void build()
public String getServiceId()
getServiceId in interface org.springframework.cloud.client.ServiceInstancepublic int getPort()
getPort in interface org.springframework.cloud.client.ServiceInstancepublic void setPort(int port)
setPort in interface ZookeeperRegistrationpublic String getHost()
getHost in interface org.springframework.cloud.client.ServiceInstancepublic boolean isSecure()
isSecure in interface org.springframework.cloud.client.ServiceInstancepublic URI getUri()
getUri in interface org.springframework.cloud.client.ServiceInstanceCopyright © 2022 Pivotal Software, Inc.. All rights reserved.