public class DefaultServiceInstance extends Object implements ServiceInstance
ServiceInstance.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultServiceInstance.Endpoint |
| Constructor and Description |
|---|
DefaultServiceInstance() |
DefaultServiceInstance(DefaultServiceInstance other) |
DefaultServiceInstance(String serviceName,
ApplicationModel applicationModel) |
DefaultServiceInstance(String serviceName,
String host,
Integer port,
ApplicationModel applicationModel) |
getMetadata, getMetadata, getOrDefaultApplicationModelpublic DefaultServiceInstance()
public DefaultServiceInstance(DefaultServiceInstance other)
public DefaultServiceInstance(String serviceName, String host, Integer port, ApplicationModel applicationModel)
public DefaultServiceInstance(String serviceName, ApplicationModel applicationModel)
public void setRawAddress(String rawAddress)
public void setServiceName(String serviceName)
public void setHost(String host)
public String getServiceName()
ServiceInstancegetServiceName in interface ServiceInstancepublic String getHost()
ServiceInstancegetHost in interface ServiceInstancepublic void setPort(int port)
public int getPort()
ServiceInstancegetPort in interface ServiceInstancepublic String getAddress()
getAddress in interface ServiceInstancepublic boolean isEnabled()
ServiceInstanceisEnabled in interface ServiceInstancetrue, indicates current instance is enabled, or disable, the client should remove this one.
The default value is truepublic void setEnabled(boolean enabled)
public boolean isHealthy()
ServiceInstanceisHealthy in interface ServiceInstancetrue, indicates current instance is healthy, or unhealthy, the client may ignore this one.
The default value is truepublic void setHealthy(boolean healthy)
public Map<String,String> getMetadata()
ServiceInstancegetMetadata in interface ServiceInstanceMappublic SortedMap<String,String> getSortedMetadata()
getSortedMetadata in interface ServiceInstancepublic String getRegistryCluster()
getRegistryCluster in interface ServiceInstancepublic void setRegistryCluster(String registryCluster)
setRegistryCluster in interface ServiceInstancepublic Map<String,String> getExtendParams()
getExtendParams in interface ServiceInstancepublic String getExtendParam(String key)
getExtendParam in interface ServiceInstancepublic String putExtendParam(String key, String value)
putExtendParam in interface ServiceInstancepublic String putExtendParamIfAbsent(String key, String value)
putExtendParamIfAbsent in interface ServiceInstancepublic String removeExtendParam(String key)
removeExtendParam in interface ServiceInstancepublic void setEndpoints(List<DefaultServiceInstance.Endpoint> endpoints)
public List<DefaultServiceInstance.Endpoint> getEndpoints()
public DefaultServiceInstance copyFrom(DefaultServiceInstance.Endpoint endpoint)
public Map<String,String> getAllParams()
getAllParams in interface ServiceInstancepublic void setApplicationModel(ApplicationModel applicationModel)
setApplicationModel in interface ServiceInstancepublic ApplicationModel getApplicationModel()
getApplicationModel in interface ServiceInstancepublic MetadataInfo getServiceMetadata()
getServiceMetadata in interface ServiceInstancepublic void setServiceMetadata(MetadataInfo serviceMetadata)
setServiceMetadata in interface ServiceInstancepublic InstanceAddressURL toURL(String protocol)
toURL in interface ServiceInstancepublic String toFullString()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.