public interface MessageStore
Mechanism for persisting messages until we know they have been received
storeArrived(String, String, MqttMessage)
.
discardArrived(String, String)
should be called.
getAllArrivedMessages(String)
is used.
clearArrivedMessages(String)
is
used.
Modifier and Type | Interface and Description |
---|---|
static interface |
MessageStore.StoredMessage
External representation of a stored message
|
Modifier and Type | Method and Description |
---|---|
void |
clearArrivedMessages(java.lang.String clientHandle)
Discard stored messages, usually for a specific client
|
boolean |
discardArrived(java.lang.String clientHandle,
java.lang.String id)
Discard a message - called when we are certain that an arrived message
has reached the application.
|
java.util.Iterator<MessageStore.StoredMessage> |
getAllArrivedMessages(java.lang.String clientHandle)
Get all the stored messages, usually for a specific client
|
java.lang.String |
storeArrived(java.lang.String clientHandle,
java.lang.String Topic,
org.eclipse.paho.client.mqttv3.MqttMessage message)
Store a message and return an identifier for it
|
java.lang.String storeArrived(java.lang.String clientHandle, java.lang.String Topic, org.eclipse.paho.client.mqttv3.MqttMessage message)
clientHandle
- identifier for the clientmessage
- message to be storedboolean discardArrived(java.lang.String clientHandle, java.lang.String id)
clientHandle
- identifier for the clientid
- id of message to be discardedjava.util.Iterator<MessageStore.StoredMessage> getAllArrivedMessages(java.lang.String clientHandle)
clientHandle
- identifier for the client - if null, then messages for all
clients are returnedvoid clearArrivedMessages(java.lang.String clientHandle)
clientHandle
- identifier for the client - if null, then messages for all
clients are discarded