IotHubListener Interface
public interface IotHubListener
Callback interface for communicating connection and message status updates from individual protocol clients (mqtt, https, amqps) to the transport layer that handles queueing of messages and connecting/reconnecting/disconnecting
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract void |
onConnectionEstablished(String connectionId)
Callback to be fired when the connection has been successfully established |
abstract void |
onConnectionLost(Throwable e, String connectionId)
Callback to be fired when connection has been lost |
abstract void |
onMessageReceived(IotHubTransportMessage transportMessage, Throwable e)
Callback to be fired when a transport message has been received. |
abstract void |
onMessageSent(Message message, String deviceId, Throwable e)
Callback to be fired when a message that the transport client sent has been acknowledged by Iot Hub |
abstract void |
onMultiplexedDeviceSessionEstablished(String connectionId, String deviceId)
Callback to be fired when the multiplexed connection establishes a new device session. |
abstract void |
onMultiplexedDeviceSessionLost(Throwable e, String connectionId, String deviceId)
Callback to be fired when the multiplexed connection loses a device session. |
abstract void |
onMultiplexedDeviceSessionRegistrationFailed(String connectionId, String deviceId, Exception e)
Callback to be fired when the multiplexed connection fails to register a device session. |
Method Details
onConnectionEstablished
public abstract void onConnectionEstablished(String connectionId)
Callback to be fired when the connection has been successfully established
Parameters:
onConnectionLost
public abstract void onConnectionLost(Throwable e, String connectionId)
Callback to be fired when connection has been lost
Parameters:
onMessageReceived
public abstract void onMessageReceived(IotHubTransportMessage transportMessage, Throwable e)
Callback to be fired when a transport message has been received.
Parameters:
onMessageSent
public abstract void onMessageSent(Message message, String deviceId, Throwable e)
Callback to be fired when a message that the transport client sent has been acknowledged by Iot Hub
Parameters:
onMultiplexedDeviceSessionEstablished
public abstract void onMultiplexedDeviceSessionEstablished(String connectionId, String deviceId)
Callback to be fired when the multiplexed connection establishes a new device session.
Parameters:
onMultiplexedDeviceSessionLost
public abstract void onMultiplexedDeviceSessionLost(Throwable e, String connectionId, String deviceId)
Callback to be fired when the multiplexed connection loses a device session.
Parameters:
onMultiplexedDeviceSessionRegistrationFailed
public abstract void onMultiplexedDeviceSessionRegistrationFailed(String connectionId, String deviceId, Exception e)
Callback to be fired when the multiplexed connection fails to register a device session.
Parameters:
Applies to
Azure SDK for Java