public class Service extends Object
Constructor and Description |
---|
Service()
Default constructor
|
Service(JsonObject service)
Constructor from JSON
|
Service(Service other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getAddress()
Get service address
|
String |
getId()
Get ID of service
|
Map<String,String> |
getMeta()
Get arbitrary KV metadata linked to the service instance.
|
String |
getName()
Get service name
|
String |
getNode()
Get none name
|
String |
getNodeAddress()
Get node address
|
int |
getPort()
Get service port
|
List<String> |
getTags()
Set list of service tags
|
int |
hashCode() |
Service |
setAddress(String address)
Set service address
|
Service |
setId(String id)
Set ID of service
|
Service |
setMeta(Map<String,String> meta)
Specifies arbitrary KV metadata linked to the service instance.
|
Service |
setName(String name)
Set service name
|
Service |
setNode(String node)
Set node name
|
Service |
setNodeAddress(String nodeAddress)
Set node address
|
Service |
setPort(int port)
Set service port
|
Service |
setTags(List<String> tags)
Set list of service tags
|
JsonObject |
toJson()
Convert to JSON
|
public Service()
public Service(Service other)
other
- the one to copypublic Service(JsonObject service)
service
- the JSONpublic JsonObject toJson()
public String getNode()
public Service setNode(String node)
node
- node namepublic String getNodeAddress()
public Service setNodeAddress(String nodeAddress)
nodeAddress
- node addresspublic String getId()
public Service setId(String id)
id
- ID of servicepublic String getName()
public Service setName(String name)
name
- service namepublic Service setTags(List<String> tags)
tags
- list of service tagspublic String getAddress()
public Service setAddress(String address)
address
- service addresspublic Map<String,String> getMeta()
public Service setMeta(Map<String,String> meta)
meta
- arbitrary KV metadatapublic int getPort()
public Service setPort(int port)
port
- service portCopyright © 2021 Eclipse. All rights reserved.