NetworkManager
class NetworkManager : ConnectionManagerInterface, MessageSender, MessageRouterObserverInterface
Content copied to clipboard
This class is designed to manage connections.
Types
Functions
Link copied to clipboard
open override fun addConnectionStatusListener(listener: ConnectionStatusListener)
Content copied to clipboard
Adds an observer to be notified of connection status changes.
Link copied to clipboard
Adds an observer to be notified when a message arrives from DeviceGateway.
Link copied to clipboard
open override fun addOnSendMessageListener(listener: MessageSender.OnSendMessageListener)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns whether this object is currently connected to DeviceGateway.
Link copied to clipboard
Return whether the connection-oriented has been started.
Link copied to clipboard
open override fun onConnectionStatusChanged(status: ConnectionStatusListener.Status, reason: ConnectionStatusListener.ChangedReason)
Content copied to clipboard
Receives the connection status changes.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun removeConnectionStatusListener(listener: ConnectionStatusListener)
Content copied to clipboard
Removes an observer from being notified of connection status changes.
Link copied to clipboard
Removes an observer to be notified when a message arrives from DeviceGateway.
Link copied to clipboard
open override fun removeOnSendMessageListener(listener: MessageSender.OnSendMessageListener)
Content copied to clipboard
Link copied to clipboard
Resets the connection immediately.
Link copied to clipboard
open override fun startReceiveServerInitiatedDirective(onCompletion: () -> Unit?): Boolean
Content copied to clipboard
Start the connection-oriented feature.
Link copied to clipboard
Stop the connection-oriented feature.