Class PermittedOptions


  • public class PermittedOptions
    extends Object
    Represents a match to allow for inbound and outbound traffic.
    Author:
    Clement Escoffier
    • 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.
    • Method Detail

      • 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