Record Class Topic
java.lang.Object
java.lang.Record
org.mqtt4j.hato.Topic
- Record Components:
name- the topic name
A validated MQTT topic name used when publishing a message.
Names are non-empty, contain neither NUL nor the wildcards + and #, and must encode
as well-formed UTF-8 in at most 65535 bytes. Names are case-sensitive and preserved exactly:
whitespace, empty levels separated by /, and a byte order mark are not removed or normalized.
The validation rules follow MQTT 3.1.1 Plus Errata 01:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Topic
Creates a topic after validating its name.- Parameters:
name- the topic name- Throws:
NullPointerException-if `name` is nullIllegalArgumentException-if `name` is empty, contains NUL, a wildcard, or an unpaired surrogate, or exceeds 65535 bytes in UTF-8
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
-