Interface ModifiableUnsubscribePacket
-
- All Superinterfaces:
UnsubscribePacket
@DoNotImplement public interface ModifiableUnsubscribePacket extends UnsubscribePacket
A copy of anUnsubscribePacketthat can be modified before it is processed by HiveMQ.- Since:
- 4.3.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull ModifiableUserPropertiesgetUserProperties()Gets the modifiableModifiableUserPropertiesof the UNSUBSCRIBE packet.voidsetTopicFilters(@NotNull List<@NotNull String> topics)Sets the list of Topics to be unsubscribed from.-
Methods inherited from interface com.hivemq.extension.sdk.api.packets.unsubscribe.UnsubscribePacket
getPacketIdentifier, getTopicFilters
-
-
-
-
Method Detail
-
setTopicFilters
void setTopicFilters(@NotNull List<@NotNull String> topics)
Sets the list of Topics to be unsubscribed from.- Parameters:
topics- The list of Topics to unsubscribe from.- Throws:
NullPointerException- If the list of topics or one of its elements isnull.IllegalArgumentException- If the amount of topics passed differs from that contained in the packet being manipulated.- Since:
- 4.3.0, CE 2020.1
-
getUserProperties
@NotNull ModifiableUserProperties getUserProperties()
Gets the modifiableModifiableUserPropertiesof the UNSUBSCRIBE packet.This setting is respected for MQTT 5 and MQTT 3.x clients when the UNSUBSCRIBE is processed by HiveMQ, this allows to enrich MQTT 3.x UNSUBSCRIBEs with this MQTT 5 property.
- Specified by:
getUserPropertiesin interfaceUnsubscribePacket- Returns:
- Modifiable user properties.
- Since:
- 4.3.0, CE 2020.1
-
-