Interface Subscription
-
- All Known Subinterfaces:
ModifiableSubscription
@Immutable @DoNotImplement public interface Subscription
Represents a subscription from a SUBSCRIBE packet.Contains all values of an MQTT 5 SUBSCRIBE, but will also used to represent MQTT 3 subscribes.
- Since:
- 4.0.0, CE 2019.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
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 RetainHandling
getRetainHandling()
The retain handling states how a retained message should be send for a subscription.@NotNull String
getTopicFilter()
The topic filter the client wants to subscribe to.
-
-
-
Method Detail
-
getTopicFilter
@NotNull String getTopicFilter()
The topic filter the client wants to subscribe to.- 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
-
getRetainHandling
@NotNull RetainHandling getRetainHandling()
The retain handling states how a retained message should be send for a subscription.RetainHandling.SEND
-> Send every retained message for any subscription.RetainHandling.SEND_IF_NEW_SUBSCRIPTION
-> Send retained messages for new subscriptions only.RetainHandling.DO_NOT_SEND
-> Do not send retained message for a subscription.
For an MQTT 3 subscription this MQTT 5 property will always be
RetainHandling.SEND
.- Returns:
- The retain handling 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.For an MQTT 3 subscription this MQTT 5 property will always be
false
.- 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.For an MQTT 3 subscription this MQTT 5 property will always be
false
.- Returns:
- The no local flag of the subscription.
- Since:
- 4.0.0, CE 2019.1
-
-