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 booleangetNoLocal()The no local flag indicates if the client wants to receive messages published by itself to the topic filter of the subscription.@NotNull QosgetQos()The quality of service level of the subscription.booleangetRetainAsPublished()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 RetainHandlinggetRetainHandling()The retain handling states how a retained message should be send for a subscription.@NotNull StringgetTopicFilter()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
truethe retain flag is preserved. Iffalseit 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
falsethe client also receives it's own messages. Iftrueit 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
-
-