CorrelatingMessageCallback Interface
public interface CorrelatingMessageCallback
This interface has a number of call backs to notify when a message is in a specific part of the IotHubTransport lifecycle.
There is no default implementation of this interface and will be up to the developer to implement.
An example of this implementation and usage can be found in the DeviceTwinSample.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract void |
onRequestAcknowledged(IotHubTransportPacket packet, Object callbackContext, Throwable e)
Called when the message request has been sent and IoT hub has acknowledged the request. |
abstract void |
onRequestQueued(Message message, IotHubTransportPacket packet, Object callbackContext)
Called when the message has been queued to the transport. |
abstract void |
onRequestSent(Message message, IotHubTransportPacket packet, Object callbackContext)
Called when the message request has been sent by the transport. |
abstract void |
onResponseAcknowledged(Message message, Object callbackContext, Throwable e)
Called when a response to the message has been sent by IoT hub and has been acknowledged by the transport. |
abstract void |
onResponseReceived(Message message, Object callbackContext, Throwable e)
Called when a response to the sent message has been sent by IoT hub and has been receieved by the transport. |
abstract void |
onUnknownMessageAcknowledged(Message message, Object callbackContext, Throwable e)
Called when the response message has been sent by IoT hub and has been acknowledged by the transport; however the message is unknown to the transport. |
Method Details
onRequestAcknowledged
public abstract void onRequestAcknowledged(IotHubTransportPacket packet, Object callbackContext, Throwable e)
Called when the message request has been sent and IoT hub has acknowledged the request.
Parameters:
null
if there are errors this will more often be a TransportException.
onRequestQueued
public abstract void onRequestQueued(Message message, IotHubTransportPacket packet, Object callbackContext)
Called when the message has been queued to the transport.
Parameters:
onRequestSent
public abstract void onRequestSent(Message message, IotHubTransportPacket packet, Object callbackContext)
Called when the message request has been sent by the transport.
Parameters:
onResponseAcknowledged
public abstract void onResponseAcknowledged(Message message, Object callbackContext, Throwable e)
Called when a response to the message has been sent by IoT hub and has been acknowledged by the transport.
Parameters:
null
if there are errors this will more often be a TransportException.
onResponseReceived
public abstract void onResponseReceived(Message message, Object callbackContext, Throwable e)
Called when a response to the sent message has been sent by IoT hub and has been receieved by the transport.
Parameters:
null
if there are errors this will more often be a TransportException.
onUnknownMessageAcknowledged
public abstract void onUnknownMessageAcknowledged(Message message, Object callbackContext, Throwable e)
Called when the response message has been sent by IoT hub and has been acknowledged by the transport; however the message is unknown to the transport.
Parameters:
null
if there are errors this will more often be a TransportException.
Applies to
Azure SDK for Java