Package io.vertx.ext.consul
Class ServiceList
- java.lang.Object
-
- io.vertx.ext.consul.ServiceList
-
public class ServiceList extends Object
Holds result of services query- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description ServiceList()
Default constructorServiceList(JsonObject json)
Constructor from JSONServiceList(ServiceList other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
long
getIndex()
Get Consul indexList<Service>
getList()
Get list of servicesint
hashCode()
ServiceList
setIndex(long index)
Set Consul index, a unique identifier representing the current state of the requested list of servicesServiceList
setList(List<Service> list)
Set list of servicesJsonObject
toJson()
Convert to JSON
-
-
-
Constructor Detail
-
ServiceList
public ServiceList()
Default constructor
-
ServiceList
public ServiceList(ServiceList other)
Copy constructor- Parameters:
other
- the one to copy
-
ServiceList
public ServiceList(JsonObject json)
Constructor from JSON- Parameters:
json
- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getIndex
public long getIndex()
Get Consul index- Returns:
- the consul index
-
setIndex
public ServiceList setIndex(long index)
Set Consul index, a unique identifier representing the current state of the requested list of services- Parameters:
index
- the consul index- Returns:
- reference to this, for fluency
-
setList
public ServiceList setList(List<Service> list)
Set list of services- Parameters:
list
- the list of services- Returns:
- reference to this, for fluency
-
-