@DoNotImplement public interface MqttTopicFilter extends MqttUtf8String
A Topic Filter has the same requirements as an UTF-8 encoded string
. Additionally it
Modifier and Type | Field and Description |
---|---|
static char |
MULTI_LEVEL_WILDCARD
The multi-level wildcard character.
|
static char |
SINGLE_LEVEL_WILDCARD
The single-level wildcard character.
|
Modifier and Type | Method and Description |
---|---|
static @NotNull MqttTopicFilterBuilder |
builder()
Creates a builder for a Topic Filter.
|
boolean |
containsMultiLevelWildcard() |
boolean |
containsSingleLevelWildcard() |
boolean |
containsWildcards() |
MqttTopicFilterBuilder.Complete |
extend()
Creates a builder for extending this Topic Filter.
|
@Immutable @NotNull List<String> |
getLevels() |
boolean |
isShared() |
boolean |
matches(@NotNull MqttTopic topic)
Matches this Topic Filter with the given Topic Name.
|
boolean |
matches(@NotNull MqttTopicFilter topicFilter)
Matches this Topic Filter with the given Topic Filter.
|
static @NotNull MqttTopicFilter |
of(@NotNull String string)
Validates and creates a Topic Filter of the given string.
|
@NotNull MqttSharedTopicFilter |
share(@NotNull String shareName) |
containsShouldNotCharacters, toByteBuffer
compareTo
static final char MULTI_LEVEL_WILDCARD
static final char SINGLE_LEVEL_WILDCARD
@NotNull static @NotNull MqttTopicFilter of(@NotNull @NotNull String string)
of
in interface MqttUtf8String
string
- the string representation of the Topic Filter.IllegalArgumentException
- if the string is not a valid Topic Filter.@NotNull static @NotNull MqttTopicFilterBuilder builder()
@NotNull @Immutable @NotNull List<String> getLevels()
boolean containsWildcards()
boolean containsMultiLevelWildcard()
boolean containsSingleLevelWildcard()
boolean isShared()
@NotNull @NotNull MqttSharedTopicFilter share(@NotNull @NotNull String shareName)
shareName
- the string representation of the Share Name.boolean matches(@NotNull @NotNull MqttTopic topic)
topic
- the Topic Name to match.boolean matches(@NotNull @NotNull MqttTopicFilter topicFilter)
topicFilter
- the Topic Filter to match.MqttTopicFilterBuilder.Complete extend()