public interface DataServiceListener
DataService
events such as notifications of connection establishing, message arrival, etc.
In order to detect implementors, the DataService
uses the The
whiteboard pattern http://www.osgi.org/wiki/uploads/Links/whiteboard.pdf
.
DataService
at the occurrence of the event.
It expected that implementers of this interface do NOT perform long running tasks in the implementation of this interface.Modifier and Type | Method and Description |
---|---|
void |
onConnectionEstablished()
Notifies that the DataService has established a connection.
|
void |
onConnectionLost(Throwable cause)
Notifies that the DataService has unexpectedly disconnected.
|
void |
onDisconnected()
Notifies that the DataService has cleanly disconnected.
|
void |
onDisconnecting()
Notifies that the DataService is about to cleanly disconnect.
|
void |
onMessageArrived(String topic,
byte[] payload,
int qos,
boolean retained)
Notifies a message arrival.
|
void |
onMessageConfirmed(int messageId,
String topic)
Confirms message delivery to the broker.
|
void |
onMessagePublished(int messageId,
String topic)
Notifies the a message has been published.
|
void onConnectionEstablished()
void onDisconnecting()
void onDisconnected()
void onConnectionLost(Throwable cause)
void onMessageArrived(String topic, byte[] payload, int qos, boolean retained)
topic
- payload
- qos
- retained
- void onMessagePublished(int messageId, String topic)
messageId
- void onMessageConfirmed(int messageId, String topic)
messageId
- Copyright © 2013. All Rights Reserved.