MqttConnectionHandlerBase class

This class provides shared connection functionality to serverand browser connection handler implementations.

Implemented types
Implementers

Constructors

MqttConnectionHandlerBase({@required int maxConnectionAttempts})
Initializes a new instance of the MqttConnectionHandlerBase class.

Properties

autoReconnectInProgress bool
Auto reconnect in progress
read / write, override
clientEventBus EventBus
The event bus
@protected, read / write
connection ↔ dynamic
The connection
@protected, read / write
connectionMessage MqttConnectMessage
read / write, override
connectionStatus MqttClientConnectionStatus
Connection status
read / write, override-getter
connectTimer MqttCancellableAsyncSleep
The broker connection acknowledgment timer
@protected, read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
maxConnectionAttempts int
Max connection attempts
final
messageProcessorRegistry Map<MqttMessageType, MessageCallbackFunction>
Registry of message processors
@protected, read / write
onAutoReconnect AutoReconnectCallback
Auto reconnect callback
read / write, override
onBadCertificate bool Function(dynamic certificate)
Callback function to handle bad certificate. if true, ignore the error.
read / write, override
onConnected ConnectCallback
Successful connection callback.
read / write, override
onDisconnected DisconnectCallback
Unsolicited disconnection callback.
read / write, override
port int
read / write, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sentMessageCallbacks List<MessageCallbackFunction>
Registry of sent message callbacks
@protected, read / write
server String
read / write, override
websocketProtocols List<String>
User supplied websocket protocols
@protected, read / write

Methods

autoReconnect(AutoReconnect reconnectEvent) → void
Auto reconnect
@protected
close() → void
Closes the connection to the Mqtt message broker.
override
connect(String server, int port, MqttConnectMessage message) Future<MqttClientConnectionStatus>
Connect to the specific Mqtt Connection.
override
connectAckProcessor(MqttMessage msg) bool
Processes the connect acknowledgement message.
@protected
disconnect() MqttConnectionState
Disconnects
override
internalConnect(String hostname, int port, MqttConnectMessage message) Future<MqttClientConnectionStatus>
Connect to the specific Mqtt Connection internally.
@protected
messageAvailable(MessageAvailable event) → void
Handles the Message Available event of the connection control for handling non connection messages.
@protected
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerForAllSentMessages(MessageCallbackFunction sentMsgCallback) → void
Registers a callback to be called whenever a message is sent.
override
registerForMessage(MqttMessageType msgType, MessageCallbackFunction callback) → void
Registers for the receipt of messages when they arrive.
override
sendMessage(MqttMessage message) → void
Sends a message to the broker through the current connection.
override
toString() String
Returns a string representation of this object.
inherited
unRegisterForAllSentMessages(MessageCallbackFunction sentMsgCallback) → void
UnRegisters a callback that is called whenever a message is sent.
override
unRegisterForMessage(MqttMessageType msgType) → void
UnRegisters for the receipt of messages when they arrive.
override

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited