Interface ModifiableSubscribePacket
-
@DoNotImplement public interface ModifiableSubscribePacket
A copy of anSubscribePacket
that can be modified for onward delivery.- 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<ModifiableSubscription>
getSubscriptions()
Get the modifiable subscriptions of the SUBSCRIBE packet.@NotNull ModifiableUserProperties
getUserProperties()
Get the modifiableUserProperties
of the SUBSCRIBE packet.
-
-
-
Method Detail
-
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.It is not possible to change the subscription identifier.
- Returns:
- An
Optional
containing the subscription identifier of the SUBSCRIBE packet if present. - Since:
- 4.2.0, CE 2020.1
-
getUserProperties
@NotNull ModifiableUserProperties getUserProperties()
Get the modifiableUserProperties
of the SUBSCRIBE packet.- Returns:
- Modifiable user properties.
- Since:
- 4.2.0, CE 2020.1
-
getSubscriptions
@Immutable @NotNull @Immutable @NotNull List<ModifiableSubscription> getSubscriptions()
Get the modifiable subscriptions of the SUBSCRIBE packet.The list itself is immutable, so you cannot add or remove subscriptions from the SUBSCRIBE. To do this please use the
SubscriptionStore
.- Returns:
- An unmodifiable list of all
ModifiableSubscription
s of the SUBSCRIBE. - Since:
- 4.2.0, CE 2020.1
-
getPacketId
int getPacketId()
The packet identifier of the SUBSCRIBE packet.It is not possible to change the packet identifier.
- Returns:
- The packet identifier.
- Since:
- 4.2.0, CE 2020.1
-
-