public class DefaultServiceInstance extends Object implements ServiceInstance
ServiceInstance.| 限定符和类型 | 类和说明 |
|---|---|
static class |
DefaultServiceInstance.Endpoint |
| 构造器和说明 |
|---|
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 在接口中 ServiceInstancepublic String getHost()
ServiceInstancegetHost 在接口中 ServiceInstancepublic void setPort(int port)
public int getPort()
ServiceInstancegetPort 在接口中 ServiceInstancepublic String getAddress()
getAddress 在接口中 ServiceInstancepublic boolean isEnabled()
ServiceInstanceisEnabled 在接口中 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 在接口中 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 在接口中 ServiceInstanceMappublic SortedMap<String,String> getSortedMetadata()
getSortedMetadata 在接口中 ServiceInstancepublic String getRegistryCluster()
getRegistryCluster 在接口中 ServiceInstancepublic void setRegistryCluster(String registryCluster)
setRegistryCluster 在接口中 ServiceInstancepublic Map<String,String> getExtendParams()
getExtendParams 在接口中 ServiceInstancepublic String getExtendParam(String key)
getExtendParam 在接口中 ServiceInstancepublic String putExtendParam(String key, String value)
putExtendParam 在接口中 ServiceInstancepublic String putExtendParamIfAbsent(String key, String value)
putExtendParamIfAbsent 在接口中 ServiceInstancepublic String removeExtendParam(String key)
removeExtendParam 在接口中 ServiceInstancepublic void setEndpoints(List<DefaultServiceInstance.Endpoint> endpoints)
public List<DefaultServiceInstance.Endpoint> getEndpoints()
public DefaultServiceInstance copyFrom(DefaultServiceInstance.Endpoint endpoint)
public DefaultServiceInstance copyFrom(int port)
public Map<String,String> getAllParams()
getAllParams 在接口中 ServiceInstancepublic void setApplicationModel(ApplicationModel applicationModel)
setApplicationModel 在接口中 ServiceInstancepublic ApplicationModel getApplicationModel()
getApplicationModel 在接口中 ServiceInstancepublic MetadataInfo getServiceMetadata()
getServiceMetadata 在接口中 ServiceInstancepublic void setServiceMetadata(MetadataInfo serviceMetadata)
setServiceMetadata 在接口中 ServiceInstancepublic InstanceAddressURL toURL(String protocol)
toURL 在接口中 ServiceInstancepublic String toFullString()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.