public class DefaultServiceInstance extends Object implements ServiceInstance
ServiceInstance.| 构造器和说明 |
|---|
DefaultServiceInstance() |
DefaultServiceInstance(String serviceName,
String host,
Integer port) |
DefaultServiceInstance(String id,
String serviceName,
String host,
Integer port) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
String |
getAddress() |
Map<String,String> |
getAllParams() |
Map<String,String> |
getExtendParams() |
String |
getHost()
The hostname of the registered service instance.
|
String |
getId()
The id of the registered service instance.
|
Map<String,String> |
getMetadata()
The key / value pair metadata associated with the service instance.
|
Integer |
getPort()
The port of the registered service instance.
|
MetadataInfo |
getServiceMetadata() |
String |
getServiceName()
The name of service that current instance belongs to.
|
int |
hashCode() |
boolean |
isEnabled()
The enable status of the registered service instance.
|
boolean |
isHealthy()
The registered service instance is health or not.
|
void |
setEnabled(boolean enabled) |
void |
setHealthy(boolean healthy) |
void |
setHost(String host) |
void |
setId(String id) |
void |
setMetadata(Map<String,String> metadata) |
void |
setPort(Integer port) |
void |
setServiceMetadata(MetadataInfo serviceMetadata) |
void |
setServiceName(String serviceName) |
String |
toString() |
InstanceAddressURL |
toURL() |
getMetadata, getMetadatapublic DefaultServiceInstance()
public DefaultServiceInstance(String id, String serviceName, String host, Integer port)
public void setId(String id)
public void setServiceName(String serviceName)
public void setHost(String host)
public String getId()
ServiceInstancegetId 在接口中 ServiceInstancepublic String getServiceName()
ServiceInstancegetServiceName 在接口中 ServiceInstancepublic String getHost()
ServiceInstancegetHost 在接口中 ServiceInstancepublic void setPort(Integer port)
public Integer 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 enabled, or disable, the client may ignore this one.
The default value is truepublic void setHealthy(boolean healthy)
public Map<String,String> getMetadata()
ServiceInstancegetMetadata 在接口中 ServiceInstanceMappublic Map<String,String> getExtendParams()
getExtendParams 在接口中 ServiceInstancepublic Map<String,String> getAllParams()
getAllParams 在接口中 ServiceInstancepublic MetadataInfo getServiceMetadata()
public void setServiceMetadata(MetadataInfo serviceMetadata)
public InstanceAddressURL toURL()
toURL 在接口中 ServiceInstancepublic boolean equals(Object o)
equals 在接口中 ServiceInstanceequals 在类中 Objecto - another ServiceInstancetrue, or falsepublic int hashCode()
hashCode 在接口中 ServiceInstancehashCode 在类中 ObjectCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.