Class UserProperty
java.lang.Object
org.mqtt4j.hato.UserProperty
An MQTT 5.0 User Property of a message: a name and a value that the application chooses.
Both are MQTT UTF-8 strings of at most 65535 bytes and may be empty. A message keeps its
User Properties in order and may repeat a name; brokers forward them in the same order.
Two User Properties are equal when their names are equal and their values are equal.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UserProperty
Validates both strings.- Parameters:
name- the property namevalue- the property value- Throws:
IllegalArgumentException-if either string contains U+0000 or an unpaired surrogate, or exceeds 65535 bytes in UTF-8
-
-
Method Details
-
name
Returns the property name, possibly empty.- Returns:
- the property name, possibly empty
-
value
Returns the property value, possibly empty.- Returns:
- the property value, possibly empty
-
equals
-
hashCode
-
toString
-