MessageRouter
class MessageRouter(transportFactory: TransportFactory, authDelegate: AuthDelegate) : MessageRouterInterface, TransportListener, MessageConsumer, MessageSender.OnSendMessageListener
Content copied to clipboard
This class which specifies the interface to manage an connection over DeviceGateway.
Constructors
Link copied to clipboard
fun MessageRouter(transportFactory: TransportFactory, authDelegate: AuthDelegate)
Content copied to clipboard
Types
Functions
Link copied to clipboard
open override fun addOnSendMessageListener(listener: MessageSender.OnSendMessageListener)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getConnectionChangedReason(): ConnectionStatusListener.ChangedReason
Content copied to clipboard
Get the status of the connection.
Link copied to clipboard
Get the status of the connection.
Link copied to clipboard
Link copied to clipboard
Return whether the connection-oriented has been started.
Link copied to clipboard
open override fun newCall(request: MessageRequest, headers: Map<String, String>?): Call
Content copied to clipboard
Prepares the MessageRequest to be executed at some point in the future.
Link copied to clipboard
Notify the onConnected observer When connected.
Link copied to clipboard
open override fun onConnecting(transport: Transport, reason: ConnectionStatusListener.ChangedReason)
Content copied to clipboard
Notify the onConnecting observer When connecting.
Link copied to clipboard
open override fun onDisconnected(transport: Transport, reason: ConnectionStatusListener.ChangedReason)
Content copied to clipboard
Notify the onDisconnected observer When disconnected.
Link copied to clipboard
open override fun onPostSendMessage(request: MessageRequest, status: Status)
Content copied to clipboard
Link copied to clipboard
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
Set the observer to this object.
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.