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 and Description
    --- | ---
    `protected List<String>` | `datacenters` Specifies the datacenters the policy is valid within
    `protected static String` | `DATACENTERS_KEY`
    `protected String` | `name` The name of the service/node

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenApplyingOptions()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TokenApplyingOptions` | `addDatacenter(String datacenter)` Adds a datacenter, like `setDatacenters(List)`
    `List<String>` | `getDatacenters()`
    `String` | `getName()`
    `TokenApplyingOptions` | `setDatacenters(List<String> datacenters)` Sets an optional datacenters.
    `TokenApplyingOptions` | `setName(String name)` Sets a name
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

    - #### datacenters

          protected List<String> datacenters

      Specifies the datacenters the policy is valid within

  - ### Constructor Detail

    - #### TokenApplyingOptions

          public TokenApplyingOptions()

  - ### 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 '_'.

    - #### getDatacenters

          public List<String> getDatacenters()

    - #### 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, like `setDatacenters(List)`
      See Also:
        `datacenters`

    - #### toJson

          public JsonObject toJson()

Copyright © 2025 Eclipse. All rights reserved.