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 int
getPacketIdentifier()
The packet identifier of the PUBREC.@NotNull AckReasonCode
getReasonCode()
The reason code from the PUBREC packet.@NotNull Optional<String>
getReasonString()
The reason string of the PUBREC packet.@NotNull UserProperties
getUserProperties()
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
Optional
for the MQTT 5 property will always be empty (if not modified by a previousPubrecInboundInterceptor
orPubrecOutboundInterceptor
).- Returns:
- An
Optional
containing 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
PubrecInboundInterceptor
orPubrecOutboundInterceptor
).- Returns:
- The user properties.
- Since:
- 4.3.0, CE 2020.1
-
-