MqttServerConnectionHandler class abstract

This class provides specific connection functionality for server based connections.

Inheritance
Implementers

Constructors

MqttServerConnectionHandler(EventBus? clientEventBus, {required int? maxConnectionAttempts, required List<RawSocketOption> socketOptions, required Duration? socketTimeout})
Initializes a new instance of the MqttServerConnectionHandler 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 ↔ AutoReconnectCallback?
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 ↔ AutoReconnectCallback?
Successful connection callback.
getter/setter pairinherited
onDisconnected ↔ AutoReconnectCallback?
Unsolicited disconnection callback.
getter/setter pairinherited
onFailedConnectionAttempt ↔ FailedConnectionAttemptCallback?
Failed connection attempt callback
getter/setter pairinherited
port ↔ int?
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secure ↔ bool
If set use a secure connection, note TCP only, not websocket.
getter/setter pair
securityContext ↔ dynamic
The security context for secure usage
getter/setter pair
sentMessageCallbacks ↔ List<MessageCallbackFunction>
Registry of sent message callbacks
getter/setter pairinherited
server ↔ String?
getter/setter pairinherited
socketOptions ↔ List<RawSocketOption>
Socket options
getter/setter pair
socketTimeout ↔ Duration?
Socket timeout duration.
getter/setter pair
useAlternateWebSocketImplementation ↔ bool
Alternate websocket implementation.
getter/setter pair
useWebSocket ↔ bool
Use a websocket rather than TCP
getter/setter pair
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([MqttDisconnectMessage? disconnectMessage]) → 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