Package io.vertx.ext.consul.token
Class TokenApplyingOptions
- java.lang.Object
-
- io.vertx.ext.consul.token.TokenApplyingOptions
-
- Direct Known Subclasses:
NodeTokenApplyingOptions
,ServiceTokenApplyingOptions
public abstract class TokenApplyingOptions extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
datacenters
Specifies the datacenters the policy is valid withinprotected static String
DATACENTERS_KEY
protected String
name
The name of the service/node
-
Constructor Summary
Constructors Constructor Description TokenApplyingOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenApplyingOptions
addDatacenter(String datacenter)
Adds a datacenter, likesetDatacenters(List)
List<String>
getDatacenters()
String
getName()
TokenApplyingOptions
setDatacenters(List<String> datacenters)
Sets an optional datacenters.TokenApplyingOptions
setName(String name)
Sets a nameJsonObject
toJson()
-
-
-
Field Detail
-
DATACENTERS_KEY
protected static final String DATACENTERS_KEY
- See Also:
- Constant Field Values
-
name
protected String name
The name of the service/node
-
-
Method Detail
-
getName
public String getName()
-
setName
public TokenApplyingOptions setName(String name)
Sets a name- Parameters:
name
- - must be no longer than 256 characters, must start and end with a lowercase alphanumeric character, and can only contain lowercase alphanumeric characters as well as '-' and '_'.
-
setDatacenters
public TokenApplyingOptions setDatacenters(List<String> datacenters)
Sets an optional datacenters. By default, the policy is valid in all datacenters- Parameters:
datacenters
- list of datacenters- See Also:
datacenters
-
addDatacenter
public TokenApplyingOptions addDatacenter(String datacenter)
Adds a datacenter, likesetDatacenters(List)
- See Also:
datacenters
-
toJson
public JsonObject toJson()
-
-