|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CloudClientListener
CloudClientListener is the interface to be implemented by applications that needs to be notified of events in the CloudClient
.
Arrived methods are invoked whenever a message is sent to a appTopic associated to the CloudClient.
The Arrived method signatures are differentiated based on whether the incoming messages have been
published to a data topic (by default accountName/#) or a control topic (by default $EDC/accountName/#).
Method Summary | |
---|---|
void |
onConnectionEstablished()
Called when the CloudClient has successfully connected with the broker. |
void |
onConnectionLost()
Called when the client has lost its connection with the broker. |
void |
onControlMessageArrived(String deviceId,
String appTopic,
EsfPayload msg,
int qos,
boolean retain)
Called by the CloudClient when it receives a published control message from the broker. |
void |
onMessageArrived(String deviceId,
String appTopic,
EsfPayload msg,
int qos,
boolean retain)
Called by the client when it receives a published data message from the broker. |
void |
onMessageConfirmed(int messageId,
String appTopic)
Called by the CloudClient when a published message has been fully acknowledged by the broker, as appropriate for the quality of service. |
void |
onMessagePublished(int messageId,
String appTopic)
Called by the CloudClient when a message has been transfered from the publishing queue to the underlying DataTransportService for publishing on the wire. |
Method Detail |
---|
void onControlMessageArrived(String deviceId, String appTopic, EsfPayload msg, int qos, boolean retain)
deviceId
- The deviceId this message was addressed to.appTopic
- The appTopic the message arrived on.msg
- The EsfPayload that arrived.qos
- The Quality of Service that the message was received on.retain
- Whether the message was retained by the broker.void onMessageArrived(String deviceId, String appTopic, EsfPayload msg, int qos, boolean retain)
deviceId
- The asset ID of the semanticTopic prefix the message arrived on.appTopic
- The appTopic the message arrived on.msg
- The EsfPayload that arrived.qos
- The Quality of Service that the message was received on.retain
- Whether the message was retained by the broker.void onConnectionLost()
DataService
configuration, the client will attempt to reconnect and call the onConnectionEstablished()
method upon a successful reconnect. This is only a notification, the callback handler should
not attempt to handle the reconnect.
onConnectionEstablished()
callback method to restore the subscriptions it needs after a connection loss.
void onConnectionEstablished()
onConnectionEstablished()
callback method to restore the subscriptions it needs after a connection loss.
void onMessageConfirmed(int messageId, String appTopic)
messageId
- The message id of the published messagevoid onMessagePublished(int messageId, String appTopic)
DataTransportService
for publishing on the wire.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |