Interface SubscribePacket
-
@DoNotImplement public interface SubscribePacket
Represents a SUBSCRIBE packet.Contains all values of an MQTT 5 SUBSCRIBE, but will also be used to represent MQTT 3 subscribe messages.
- Since:
- 4.2.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPacketId()
The packet identifier of the SUBSCRIBE packet.@NotNull Optional<Integer>
getSubscriptionIdentifier()
If this property is present, it contains the subscription identifier for the SUBSCRIBE packet.@Immutable @NotNull List<Subscription>
getSubscriptions()
The list of unmodifiable subscriptions of the SUBSCRIBE.@Immutable @NotNull UserProperties
getUserProperties()
The user properties from the SUBSCRIBE packet.
-
-
-
Method Detail
-
getSubscriptions
@Immutable @NotNull @Immutable @NotNull List<Subscription> getSubscriptions()
The list of unmodifiable subscriptions of the SUBSCRIBE.- Returns:
- The list of
Subscription
s. - Since:
- 4.2.0, CE 2020.1
-
getUserProperties
@Immutable @NotNull @Immutable @NotNull UserProperties getUserProperties()
The user properties from the SUBSCRIBE packet.For an MQTT 3 client this MQTT 5 property will always contain an empty list as the user properties.
- Returns:
- The
UserProperties
of the SUBSCRIBE packet. - Since:
- 4.2.0, CE 2020.1
-
getSubscriptionIdentifier
@NotNull Optional<Integer> getSubscriptionIdentifier()
If this property is present, it contains the subscription identifier for the SUBSCRIBE packet.For an MQTT 3 client this
Optional
for the MQTT 5 property will always be empty.- Returns:
- An
Optional
containing the subscription identifier of the SUBSCRIBE packet if present. - Since:
- 4.2.0, CE 2020.1
-
getPacketId
int getPacketId()
The packet identifier of the SUBSCRIBE packet.- Returns:
- The packet identifier.
- Since:
- 4.2.0, CE 2020.1
-
-