Package io.vertx.ext.bridge

## Class PermittedOptions

- java.lang.Object
- - io.vertx.ext.bridge.PermittedOptions

-     public class PermittedOptions
      extends Object

  Represents a match to allow for inbound and outbound traffic.
  Author:
    Clement Escoffier

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `DEFAULT_ADDRESS` | The default permitted address : `null`.
    `static String` | `DEFAULT_ADDRESS_REGEX` | The default permitted address regex : `null`.
    `static JsonObject` | `DEFAULT_MATCH` | The default permitted match : `null`.
    `static String` | `DEFAULT_REQUIRED_AUTHORITY` | The default permitted required authority : `null`.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PermittedOptions()` | Creates a new instance of `PermittedOptions`.
    `PermittedOptions​(JsonObject json)` | Creates a new instance of `PermittedOptions` from its JSON representation.
    `PermittedOptions​(PermittedOptions that)` | Creates a new instance of `PermittedOptions` copying the given `PermittedOptions`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getAddress()` |
    `String` | `getAddressRegex()` |
    `JsonObject` | `getMatch()` |
    `String` | `getRequiredAuthority()` |
    `PermittedOptions` | `setAddress​(String address)` | The exact address the message is being sent to.
    `PermittedOptions` | `setAddressRegex​(String addressRegex)` | A regular expression that will be matched against the address.
    `PermittedOptions` | `setMatch​(JsonObject match)` | This allows you to allow messages based on their structure.
    `PermittedOptions` | `setRequiredAuthority​(String requiredAuthority)` | Declare a specific authority that user must have in order to allow messages
    `JsonObject` | `toJson()` | Serializes the current instance of `PermittedOptions` to JSON.

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

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

- - ### Field Detail

    - #### DEFAULT_MATCH

          public static JsonObject DEFAULT_MATCH

      The default permitted match : `null`.

    - #### DEFAULT_ADDRESS

          public static String DEFAULT_ADDRESS

      The default permitted address : `null`.

    - #### DEFAULT_ADDRESS_REGEX

          public static String DEFAULT_ADDRESS_REGEX

      The default permitted address regex : `null`.

    - #### DEFAULT_REQUIRED_AUTHORITY

          public static String DEFAULT_REQUIRED_AUTHORITY

      The default permitted required authority : `null`.

  - ### Constructor Detail

    - #### PermittedOptions

          public PermittedOptions()

      Creates a new instance of `PermittedOptions`.

    - #### PermittedOptions

          public PermittedOptions​(PermittedOptions that)

      Creates a new instance of `PermittedOptions` copying the given `PermittedOptions`.
      Parameters:
        `that` - the `PermittedOptions` to copy

    - #### PermittedOptions

          public PermittedOptions​(JsonObject json)

      Creates a new instance of `PermittedOptions` from its JSON representation. This method uses the generated converter.
      Parameters:
        `json` - the serialized `PermittedOptions`
      See Also:
        `toJson()`, `PermittedOptionsConverter`

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Serializes the current instance of `PermittedOptions` to JSON. This method uses the generated converter.
      Returns:
        the created JSON object
      See Also:
        `PermittedOptionsConverter`

    - #### getAddress

          public String getAddress()

      Returns:
        the address.

    - #### setAddress

          public PermittedOptions setAddress​(String address)

      The exact address the message is being sent to. If you want to allow messages based on an exact address you use this field.
      Parameters:
        `address` - the address
      Returns:
        a reference to this, so the API can be used fluently

    - #### getAddressRegex

          public String getAddressRegex()

      Returns:
        the address regular expression.

    - #### setAddressRegex

          public PermittedOptions setAddressRegex​(String addressRegex)

      A regular expression that will be matched against the address. If you want to allow messages based on a regular expression you use this field. If the `setAddress(java.lang.String)` value is specified this will be ignored.
      Parameters:
        `addressRegex` - the address regex
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMatch

          public JsonObject getMatch()

      Returns:
        the match structure.

    - #### setMatch

          public PermittedOptions setMatch​(JsonObject match)

      This allows you to allow messages based on their structure. Any fields in the match must exist in the message with the same values for them to be allowed. This currently only works with JSON messages.
      Parameters:
        `match` - the match json object
      Returns:
        a reference to this, so the API can be used fluently

    - #### getRequiredAuthority

          public String getRequiredAuthority()

    - #### setRequiredAuthority

          public PermittedOptions setRequiredAuthority​(String requiredAuthority)

      Declare a specific authority that user must have in order to allow messages
      Parameters:
        `requiredAuthority` - the authority
      Returns:
        a reference to this, so the API can be used fluently