Package io.vertx.ext.consul
Class Node
- java.lang.Object
-
- io.vertx.ext.consul.Node
-
public class Node extends Object
- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description Node()Default constructorNode(JsonObject json)Constructor from JSONNode(Node other)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetAddress()Get node addressStringgetDatacenter()Get node datacenterStringgetId()Get node idStringgetLanAddress()Get node lan addressStringgetName()Get node nameMap<String,String>getNodeMeta()Get node metaStringgetWanAddress()Get node wan addressinthashCode()NodesetAddress(String address)Set node addressNodesetDatacenter(String datacenter)Set node datacenterNodesetId(String id)Set node idNodesetLanAddress(String lanAddress)Set node lan addressNodesetName(String node)Set node nameNodesetNodeMeta(Map<String,String> nodeMeta)Set node metaNodesetWanAddress(String wanAddress)Set node wan addressJsonObjecttoJson()Convert to JSON
-
-
-
Constructor Detail
-
Node
public Node()
Default constructor
-
Node
public Node(Node other)
Copy constructor- Parameters:
other- the one to copy
-
Node
public Node(JsonObject json)
Constructor from JSON- Parameters:
json- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getId
public String getId()
Get node id- Returns:
- node id
-
getName
public String getName()
Get node name- Returns:
- node name
-
getAddress
public String getAddress()
Get node address- Returns:
- node address
-
getLanAddress
public String getLanAddress()
Get node lan address- Returns:
- node lan address
-
getWanAddress
public String getWanAddress()
Get node wan address- Returns:
- node wan address
-
getDatacenter
public String getDatacenter()
Get node datacenter- Returns:
- node datacenter
-
setId
public Node setId(String id)
Set node id- Parameters:
id- node id- Returns:
- reference to this, for fluency
-
setName
public Node setName(String node)
Set node name- Parameters:
node- node name- Returns:
- reference to this, for fluency
-
setAddress
public Node setAddress(String address)
Set node address- Parameters:
address- node address- Returns:
- reference to this, for fluency
-
setLanAddress
public Node setLanAddress(String lanAddress)
Set node lan address- Parameters:
lanAddress- node lan address- Returns:
- reference to this, for fluency
-
setWanAddress
public Node setWanAddress(String wanAddress)
Set node wan address- Parameters:
wanAddress- node wan address- Returns:
- reference to this, for fluency
-
setDatacenter
public Node setDatacenter(String datacenter)
Set node datacenter- Parameters:
datacenter- node datacenter- Returns:
- reference to this, for fluency
-
setNodeMeta
public Node setNodeMeta(Map<String,String> nodeMeta)
Set node meta- Parameters:
nodeMeta- node nodeMeta- Returns:
- reference to this, for fluency
-
-