public class NewServiceEntry extends AbstractServiceEntry
name
Constructor and Description |
---|
NewServiceEntry(java.lang.String serviceName) |
Modifier and Type | Method and Description |
---|---|
NewServiceEntry |
address(java.net.InetAddress address) |
NewServiceEntry |
address(java.lang.String address) |
NewServiceEntry |
check(NewCheck check)
See https://www.consul.io/api/agent/service.html#checks.
|
NewServiceEntry |
checks(java.util.List<NewCheck> checks)
See https://www.consul.io/api/agent/service.html#checks.
|
java.util.List<NewCheck> |
getChecks()
See https://www.consul.io/api/agent/service.html#checks.
|
NewServiceEntry |
id(java.lang.String id) |
NewServiceEntry |
port(java.lang.Integer port) |
protected void |
setChecks(java.util.List<HTTPCheck> checks) |
NewServiceEntry |
tags(java.util.List<java.lang.String> tags) |
NewServiceEntry |
tags(java.lang.String... tags) |
equals, getAddress, getID, getMeta, getName, getPort, getTags, hashCode, meta, setAddress, setID, setMeta, setPort, setTags
public NewServiceEntry(java.lang.String serviceName)
serviceName
- The service namepublic java.util.List<NewCheck> getChecks()
public NewServiceEntry checks(java.util.List<NewCheck> checks)
checks
- The health checksNewServiceEntry
instancepublic NewServiceEntry check(NewCheck check)
check
- The health checkNewServiceEntry
instancepublic NewServiceEntry id(java.lang.String id)
id
in class AbstractServiceEntry
id
- The id of the serviceAbstractServiceEntry
instancepublic NewServiceEntry address(java.net.InetAddress address)
address
in class AbstractServiceEntry
address
- The InetAddress
of the serviceAbstractServiceEntry
instancepublic NewServiceEntry address(java.lang.String address)
address
in class AbstractServiceEntry
address
- The address of the serviceAbstractServiceEntry
instancepublic NewServiceEntry port(java.lang.Integer port)
port
in class AbstractServiceEntry
port
- The port of the serviceAbstractServiceEntry
instancepublic NewServiceEntry tags(java.util.List<java.lang.String> tags)
tags
in class AbstractServiceEntry
tags
- The service tagsAbstractServiceEntry
instancepublic NewServiceEntry tags(java.lang.String... tags)
tags
- The tagsNewServiceEntry
instanceprotected void setChecks(java.util.List<HTTPCheck> checks)
checks
- The list of Http checks