MqttServerConnectionHandler class

This class provides specific connection functionality for server based connections.

Inheritance
Implementers

Constructors

MqttServerConnectionHandler(dynamic clientEventBus, {@required int maxConnectionAttempts})
Initializes a new instance of the MqttServerConnectionHandler class.

Properties

autoReconnectInProgress bool
Auto reconnect in progress
read / write, inherited
clientEventBus EventBus
The event bus
@protected, read / write, inherited
connection ↔ dynamic
The connection
@protected, read / write, inherited
connectionMessage MqttConnectMessage
read / write, inherited
connectionStatus MqttClientConnectionStatus
Connection status
read / write, inherited
connectTimer MqttCancellableAsyncSleep
The broker connection acknowledgment timer
@protected, read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
initialConnectionComplete bool
We have had an initial connection
@protected, read / write, inherited
maxConnectionAttempts int
Max connection attempts
final, inherited
messageProcessorRegistry Map<MqttMessageType, MessageCallbackFunction>
Registry of message processors
@protected, read / write, inherited
onAutoReconnect AutoReconnectCallback
Auto reconnect callback
read / write, inherited
onAutoReconnected AutoReconnectCompleteCallback
Auto reconnected callback
read / write, inherited
onBadCertificate bool Function(dynamic certificate)
Callback function to handle bad certificate. if true, ignore the error.
read / write, inherited
onConnected ConnectCallback
Successful connection callback.
read / write, inherited
onDisconnected DisconnectCallback
Unsolicited disconnection callback.
read / write, inherited
port int
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
secure bool
If set use a secure connection, note TCP only, not websocket.
read / write
securityContext ↔ dynamic
The security context for secure usage
read / write
sentMessageCallbacks List<MessageCallbackFunction>
Registry of sent message callbacks
@protected, read / write, inherited
server String
read / write, inherited
useAlternateWebSocketImplementation bool
Alternate websocket implementation. [...]
read / write
useWebSocket bool
Use a websocket rather than TCP
read / write
websocketProtocols List<String>
User supplied websocket protocols
@protected, read / write, inherited

Methods

autoReconnect(AutoReconnect reconnectEvent) → void
Auto reconnect
@protected, inherited
close() → void
Closes the connection to the Mqtt message broker.
inherited
connect(String server, int port, MqttConnectMessage message) Future<MqttClientConnectionStatus>
Connect to the specific Mqtt Connection.
inherited
connectAckProcessor(MqttMessage msg) bool
Processes the connect acknowledgement message.
@protected, inherited
connectAckReceived(ConnectAckMessageAvailable 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<MqttClientConnectionStatus>
Connect to the specific Mqtt Connection internally.
@protected, inherited
messageAvailable(MessageAvailable event) → void
Handles the Message Available event of the connection control for handling non connection messages.
@protected, inherited
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.
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
Returns 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