MqttConnectMessage class
An Mqtt message that is used to initiate a connection to a message broker.
- Inheritance
-
- Object
- MqttMessage
- MqttConnectMessage
Constructors
- MqttConnectMessage()
- Initializes a new instance of the MqttConnectMessage class. Only called via the MqttMessage.create operation during processing of an Mqtt message stream.
- MqttConnectMessage.fromByteBuffer(MqttHeader header, MqttByteBuffer messageStream)
- Initializes a new instance of the MqttConnectMessage class.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- header ↔ MqttHeader?
-
The header of the MQTT Message. Contains metadata about the message
getter/setter pairinherited
- payload ↔ MqttConnectPayload
-
The payload of the Mqtt Message.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- variableHeader ↔ MqttConnectVariableHeader?
-
The variable header contents. Contains extended metadata about the message
getter/setter pair
Methods
-
authenticateAs(
String? username, String? password) → MqttConnectMessage - Sets the authentication
-
keepAliveFor(
int keepAliveSeconds) → MqttConnectMessage - Sets the keep alive period
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFrom(
MqttByteBuffer messageStream) → void -
Reads a message from the supplied stream.
override
-
startClean(
) → MqttConnectMessage - Sets the startClean flag so that the broker drops any messages that were previously destined for us.
-
toString(
) → String -
A string representation of this object.
override
-
will(
) → MqttConnectMessage - Sets the Will flag of the variable header
-
withClientIdentifier(
String clientIdentifier) → MqttConnectMessage - Sets the client identifier of the message.
-
withProtocolName(
String protocolName) → MqttConnectMessage - Sets the name of the protocol to use.
-
withProtocolVersion(
int protocolVersion) → MqttConnectMessage - Sets the protocol version.
-
withWillMessage(
String willMessage) → MqttConnectMessage - Sets the will message.
-
withWillQos(
MqttQos qos) → MqttConnectMessage - Sets the WillQos of the connect flag.
-
withWillRetain(
) → MqttConnectMessage - Sets the WillRetain flag of the Connection Flags
-
withWillTopic(
String willTopic) → MqttConnectMessage - Sets the Will Topic
-
writeTo(
MqttByteBuffer messageStream) → void -
Writes the message to the supplied stream.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited