Package io.vertx.ext.consul
Class ServiceOptions
- java.lang.Object
-
- io.vertx.ext.consul.ServiceOptions
-
public class ServiceOptions extends Object
Options used to register service.- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description ServiceOptions()
Default constructorServiceOptions(JsonObject options)
Constructor from JSONServiceOptions(ServiceOptions options)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAddress()
Get service addressList<CheckOptions>
getCheckListOptions()
Get checks options of serviceCheckOptions
getCheckOptions()
Get check options of serviceConnectOptions
getConnectOptions()
Get consul-connect options of servicelong
getCreateIndex()
Get the internal index value that represents when the entry was created.String
getId()
Get the ID of sessionMap<String,String>
getMeta()
Get arbitrary KV metadata linked to the service instance.long
getModifyIndex()
Get the last index that modified this key.String
getName()
Get service nameint
getPort()
Get service portList<String>
getTags()
Get list of tags associated with serviceServiceOptions
setAddress(String address)
Set service addressServiceOptions
setCheckListOptions(List<CheckOptions> checkListOptions)
Set checks options of serviceServiceOptions
setCheckOptions(CheckOptions checkOptions)
Set check options of serviceServiceOptions
setConnectOptions(ConnectOptions connectOptions)
Set consul-connect options of serviceServiceOptions
setCreateIndex(long createIndex)
Set the internal index value that represents when the entry was created.ServiceOptions
setId(String id)
Set the ID of sessionServiceOptions
setMeta(Map<String,String> meta)
Specifies arbitrary KV metadata linked to the service instance.ServiceOptions
setModifyIndex(long modifyIndex)
Set the last index that modified this key.ServiceOptions
setName(String name)
Set service nameServiceOptions
setPort(int port)
Set service portServiceOptions
setTags(List<String> tags)
Set list of tags associated with serviceJsonObject
toJson()
Convert to JSON
-
-
-
Constructor Detail
-
ServiceOptions
public ServiceOptions()
Default constructor
-
ServiceOptions
public ServiceOptions(ServiceOptions options)
Copy constructor- Parameters:
options
- the one to copy
-
ServiceOptions
public ServiceOptions(JsonObject options)
Constructor from JSON- Parameters:
options
- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getId
public String getId()
Get the ID of session- Returns:
- the ID of session
-
setId
public ServiceOptions setId(String id)
Set the ID of session- Parameters:
id
- the ID of session- Returns:
- reference to this, for fluency
-
getName
public String getName()
Get service name- Returns:
- service name
-
setName
public ServiceOptions setName(String name)
Set service name- Parameters:
name
- service name- Returns:
- reference to this, for fluency
-
getTags
public List<String> getTags()
Get list of tags associated with service- Returns:
- list of tags
-
setTags
public ServiceOptions setTags(List<String> tags)
Set list of tags associated with service- Parameters:
tags
- list of tags- Returns:
- reference to this, for fluency
-
getAddress
public String getAddress()
Get service address- Returns:
- service address
-
setAddress
public ServiceOptions setAddress(String address)
Set service address- Parameters:
address
- service address- Returns:
- reference to this, for fluency
-
getMeta
public Map<String,String> getMeta()
Get arbitrary KV metadata linked to the service instance.- Returns:
- arbitrary KV metadata
-
setMeta
public ServiceOptions setMeta(Map<String,String> meta)
Specifies arbitrary KV metadata linked to the service instance.- Parameters:
meta
- arbitrary KV metadata- Returns:
- reference to this, for fluency
-
getPort
public int getPort()
Get service port- Returns:
- service port
-
setPort
public ServiceOptions setPort(int port)
Set service port- Parameters:
port
- service port- Returns:
- reference to this, for fluency
-
getCheckOptions
public CheckOptions getCheckOptions()
Get check options of service- Returns:
- check options
-
setCheckOptions
public ServiceOptions setCheckOptions(CheckOptions checkOptions)
Set check options of service- Parameters:
checkOptions
- check options- Returns:
- reference to this, for fluency
-
getCheckListOptions
public List<CheckOptions> getCheckListOptions()
Get checks options of service- Returns:
- checks options
-
setCheckListOptions
public ServiceOptions setCheckListOptions(List<CheckOptions> checkListOptions)
Set checks options of service- Parameters:
checkListOptions
- check options- Returns:
- reference to this, for fluency
-
getCreateIndex
public long getCreateIndex()
Get the internal index value that represents when the entry was created.- Returns:
- the internal index value that represents when the entry was created.
-
setCreateIndex
public ServiceOptions setCreateIndex(long createIndex)
Set the internal index value that represents when the entry was created.- Parameters:
createIndex
- the internal index value that represents when the entry was created.- Returns:
- reference to this, for fluency
-
getModifyIndex
public long getModifyIndex()
Get the last index that modified this key.- Returns:
- the last index that modified this key.
-
setModifyIndex
public ServiceOptions setModifyIndex(long modifyIndex)
Set the last index that modified this key.- Parameters:
modifyIndex
- the last index that modified this key.- Returns:
- reference to this, for fluency
-
getConnectOptions
public ConnectOptions getConnectOptions()
Get consul-connect options of service- Returns:
- consul-connect options
-
setConnectOptions
public ServiceOptions setConnectOptions(ConnectOptions connectOptions)
Set consul-connect options of service- Parameters:
connectOptions
- consul-connect options- Returns:
- reference to this, for fluency
-
-