Class PermittedOptions
java.lang.Object
io.vertx.ext.bridge.PermittedOptions
Represents a match to allow for inbound and outbound traffic.
- Author:
- Clement Escoffier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringThe default permitted address :null.static StringThe default permitted address regex :null.static JsonObjectThe default permitted match :null.static StringThe default permitted required authority :null. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofPermittedOptions.PermittedOptions(JsonObject json) Creates a new instance ofPermittedOptionsfrom its JSON representation.Creates a new instance ofPermittedOptionscopying the givenPermittedOptions. -
Method Summary
Modifier and TypeMethodDescriptiongetMatch()setAddress(String address) The exact address the message is being sent to.setAddressRegex(String addressRegex) A regular expression that will be matched against the address.setMatch(JsonObject match) This allows you to allow messages based on their structure.setRequiredAuthority(String requiredAuthority) Declare a specific authority that user must have in order to allow messagestoJson()Serializes the current instance ofPermittedOptionsto JSON.
-
Field Details
-
DEFAULT_MATCH
The default permitted match :null. -
DEFAULT_ADDRESS
The default permitted address :null. -
DEFAULT_ADDRESS_REGEX
The default permitted address regex :null. -
DEFAULT_REQUIRED_AUTHORITY
The default permitted required authority :null.
-
-
Constructor Details
-
PermittedOptions
public PermittedOptions()Creates a new instance ofPermittedOptions. -
PermittedOptions
Creates a new instance ofPermittedOptionscopying the givenPermittedOptions.- Parameters:
that- thePermittedOptionsto copy
-
PermittedOptions
Creates a new instance ofPermittedOptionsfrom its JSON representation. This method uses the generated converter.- Parameters:
json- the serializedPermittedOptions- See Also:
-
-
Method Details
-
toJson
Serializes the current instance ofPermittedOptionsto JSON. This method uses the generated converter.- Returns:
- the created JSON object
- See Also:
-
getAddress
- Returns:
- the address.
-
setAddress
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
- Returns:
- the address regular expression.
-
setAddressRegex
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 thesetAddress(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
- Returns:
- the match structure.
-
setMatch
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
-
setRequiredAuthority
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
-