|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataServiceListener
Implementors of this interface will be able to handle 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
.
All registered listeners are called synchronously by the 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.
Method Summary | |
---|---|
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. |
Method Detail |
---|
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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |