MqttBrowserConnectionHandler class abstract
This class provides specific connection functionality for browser based connection handler implementations.
- Inheritance
-
- Object
- MqttConnectionHandlerBase
- MqttBrowserConnectionHandler
- Implementers
Constructors
- MqttBrowserConnectionHandler(dynamic clientEventBus, {required int maxConnectionAttempts})
- Initializes a new instance of the MqttBrowserConnectionHandler class.
Properties
- authenticationRequested ↔ bool?
-
Indicates if the connect message has an authentication method
i.e. authentication has been requested.
getter/setter pairinherited
- autoReconnectInProgress ↔ bool?
-
Auto reconnect in progress
getter/setter pairinherited
- clientEventBus ↔ EventBus?
-
The event bus
getter/setter pairinherited
- connection ↔ dynamic
-
The connection
getter/setter pairinherited
- connectionMessage ↔ MqttConnectMessage?
-
getter/setter pairinherited
- connectionStatus ↔ MqttConnectionStatus
-
Connection status
getter/setter pairinherited
- connectTimer ↔ MqttCancellableAsyncSleep
-
The broker connection acknowledgment timer
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialConnectionComplete ↔ bool
-
We have had an initial connection
getter/setter pairinherited
- maxConnectionAttempts → int?
-
Max connection attempts
finalinherited
-
messageProcessorRegistry
↔ Map<
MqttMessageType, MessageCallbackFunction?> -
Registry of message processors
getter/setter pairinherited
- onAutoReconnect ↔ AutoReconnectCallback?
-
Auto reconnect callback
getter/setter pairinherited
- onAutoReconnected ↔ AutoReconnectCompleteCallback?
-
Auto reconnected callback
getter/setter pairinherited
- onBadCertificate ↔ bool Function(dynamic certificate)?
-
Callback function to handle bad certificate. if true, ignore the error.
getter/setter pairinherited
- onConnected ↔ ConnectCallback?
-
Successful connection callback.
getter/setter pairinherited
- onDisconnected ↔ DisconnectCallback?
-
Unsolicited disconnection callback.
getter/setter pairinherited
- port ↔ int?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sentMessageCallbacks
↔ List<
MessageCallbackFunction> -
Registry of sent message callbacks
getter/setter pairinherited
- server ↔ String?
-
getter/setter pairinherited
-
websocketProtocols
↔ List<
String> ? -
User supplied websocket protocols
getter/setter pairinherited
Methods
-
autoReconnect(
MqttAutoReconnect reconnectEvent) → void -
Auto reconnect
inherited
-
close(
) → void -
Closes the connection to the Mqtt message broker.
inherited
-
connect(
String? server, int? port, MqttConnectMessage? message) → Future< MqttConnectionStatus> -
Connect to the specific Mqtt Connection.
inherited
-
connectAckProcessor(
MqttMessage msg) → bool -
Processes the connect acknowledgement message.
inherited
-
connectAckReceived(
MqttConnectAckMessageAvailable event) → void -
Connect acknowledge recieved
inherited
-
disconnect(
) → MqttConnectionState -
Disconnects
inherited
-
initialiseListeners(
) → void -
Initialise the event listeners;
inherited
-
internalConnect(
String? hostname, int? port, MqttConnectMessage? message) → Future< MqttConnectionStatus> -
Connect to the specific Mqtt Connection internally.
inherited
-
messageAvailable(
MqttMessageAvailable event) → void -
Handles the Message Available event of the connection control for
handling non connection messages.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerForAllSentMessages(
MessageCallbackFunction sentMsgCallback) → void -
Registers a callback to be called whenever a message is sent.
inherited
-
registerForMessage(
MqttMessageType msgType, MessageCallbackFunction callback) → void -
Registers for the receipt of messages when they arrive.
inherited
-
sendMessage(
MqttMessage message) → void -
Sends a message to the broker through the current connection.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unRegisterForAllSentMessages(
MessageCallbackFunction sentMsgCallback) → void -
UnRegisters a callback that is called whenever a message is sent.
inherited
-
unRegisterForMessage(
MqttMessageType msgType) → void -
UnRegisters for the receipt of messages when they arrive.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited