Interface TopicSubscription
-
@DoNotImplement public interface TopicSubscription
Represents a Subscription.Contains all values (except
RetainHandling
) of an MQTT 5 Subscription, but is also used to represent MQTT 3 Subscriptions.- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description static TopicSubscriptionBuilder
builder()
Deprecated.UseBuilders.topicSubscription()
insteadboolean
getNoLocal()
The no local flag indicates if the client wants to receive messages published by itself to the topic filter of the subscription.@NotNull Qos
getQos()
The quality of service level of the subscription.boolean
getRetainAsPublished()
The retain as published flag indicates if the client wants the retain flag preserved for received messages to the topic filter of the subscription.@NotNull Optional<Integer>
getSubscriptionIdentifier()
The current subscription identifier that is associated with the subscription.@NotNull String
getTopicFilter()
The topic filter of the subscription.
-
-
-
Method Detail
-
builder
@Deprecated(since="4.4.0") static TopicSubscriptionBuilder builder()
Deprecated.UseBuilders.topicSubscription()
instead- Returns:
- A new
TopicSubscriptionBuilder
to create a topic subscription. - Since:
- 4.0.0, CE 2019.1
-
getTopicFilter
@NotNull String getTopicFilter()
The topic filter of the subscription.- Returns:
- The topic filter of the subscription.
- Since:
- 4.0.0, CE 2019.1
-
getQos
@NotNull Qos getQos()
The quality of service level of the subscription.- Returns:
- The quality of service level of the subscription.
- Since:
- 4.0.0, CE 2019.1
-
getRetainAsPublished
boolean getRetainAsPublished()
The retain as published flag indicates if the client wants the retain flag preserved for received messages to the topic filter of the subscription.If
true
the retain flag is preserved. Iffalse
it isn't.- Returns:
- The retain as published flag of the subscription.
- Since:
- 4.0.0, CE 2019.1
-
getNoLocal
boolean getNoLocal()
The no local flag indicates if the client wants to receive messages published by itself to the topic filter of the subscription.If
false
the client also receives it's own messages. Iftrue
it doesn't.- Returns:
- The no local flag of the subscription.
- Since:
- 4.0.0, CE 2019.1
-
-