Interface ModifiablePubrelPacket
-
- All Superinterfaces:
PubrelPacket
@DoNotImplement public interface ModifiablePubrelPacket extends PubrelPacket
APubrelPacket
that can be modified before it is sent to the client (forPubrelOutboundInterceptor
) or to the server (forPubrelInboundInterceptor
).- Since:
- 4.3.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull ModifiableUserProperties
getUserProperties()
Get the modifiableUserProperties
of the PUBREL packet.void
setReasonString(@Nullable String reasonString)
Set the reason string.-
Methods inherited from interface com.hivemq.extension.sdk.api.packets.pubrel.PubrelPacket
getPacketIdentifier, getReasonCode, getReasonString
-
-
-
-
Method Detail
-
setReasonString
void setReasonString(@Nullable String reasonString)
Set the reason string.A reason must not be set for a successful publish.
For an
PubrelOutboundInterceptor
this setting is only respected for MQTT 5 clients and ignored for MQTT 3.x clients when the PUBREL is sent to the client (as MQTT 3.x clients don't know this property).For an
PubrelInboundInterceptor
this setting is respected for MQTT 5 and MQTT 3.x clients when the PUBREL is sent to HiveMQ, this allows to enrich MQTT 3.x PUBRELs with this MQTT 5 property.- Parameters:
reasonString
- The reason string to set.- Throws:
IllegalArgumentException
- If the reason string is not a valid UTF-8 string.IllegalArgumentException
- If the reason string exceeds the UTF-8 string length limit.- Since:
- 4.3.0, CE 2020.1
-
getUserProperties
@NotNull ModifiableUserProperties getUserProperties()
Get the modifiableUserProperties
of the PUBREL packet.For an
PubrelOutboundInterceptor
this setting is only respected for MQTT 5 clients and ignored for MQTT 3.x clients when the PUBREL is sent to the client (as MQTT 3.x clients don't know this property).For an
PubrelInboundInterceptor
this setting is respected for MQTT 5 and MQTT 3.x clients when the PUBREL is sent to HiveMQ, this allows to enrich MQTT 3.x PUBRELs with this MQTT 5 property.- Specified by:
getUserProperties
in interfacePubrelPacket
- Returns:
- Modifiable user properties.
- Since:
- 4.3.0, CE 2020.1
-
-