Interface PubrecPacket
-
- All Known Subinterfaces:
ModifiablePubrecPacket
@Immutable @DoNotImplement public interface PubrecPacket
Represents a PUBREC packet.Contains all values of an MQTT 5 PUBREC, but will also used to represent MQTT 3 PUBREC packets.
- Since:
- 4.3.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetPacketIdentifier()The packet identifier of the PUBREC.@NotNull AckReasonCodegetReasonCode()The reason code from the PUBREC packet.@NotNull Optional<String>getReasonString()The reason string of the PUBREC packet.@NotNull UserPropertiesgetUserProperties()The user properties from the PUBREC packet.
-
-
-
Method Detail
-
getPacketIdentifier
int getPacketIdentifier()
The packet identifier of the PUBREC.- Returns:
- The packet identifier.
- Since:
- 4.3.0, CE 2020.1
-
getReasonCode
@NotNull AckReasonCode getReasonCode()
The reason code from the PUBREC packet.- Returns:
- The pubrec reason code.
- Since:
- 4.3.0, CE 2020.1
- See Also:
How reason codes are translated from MQTT 5 to MQTT 3.
-
getReasonString
@NotNull Optional<String> getReasonString()
The reason string of the PUBREC packet.For an MQTT 3 client this
Optionalfor the MQTT 5 property will always be empty (if not modified by a previousPubrecInboundInterceptororPubrecOutboundInterceptor).- Returns:
- An
Optionalcontaining the pubrec reason string if present. - Since:
- 4.3.0, CE 2020.1
-
getUserProperties
@NotNull UserProperties getUserProperties()
The user properties from the PUBREC packet.For an MQTT 3 client this MQTT 5 property will always be empty (if not modified by a previous
PubrecInboundInterceptororPubrecOutboundInterceptor).- Returns:
- The user properties.
- Since:
- 4.3.0, CE 2020.1
-
-