public class InMemoryMqttMessageStore extends Object implements IMqttMessageStore
| 构造器和说明 |
|---|
InMemoryMqttMessageStore() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addRetainMessage(String topic,
Message message)
存储 retain 消息
|
boolean |
addWillMessage(String clientId,
Message message)
存储 clientId 的遗嘱消息
|
boolean |
clearRetainMessage(String topic)
清理该 topic 的 retain 消息
|
boolean |
clearWillMessage(String clientId)
清理该 clientId 的遗嘱消息
|
List<Message> |
getRetainMessage(String topicFilter)
获取所有 retain 消息
|
Message |
getWillMessage(String clientId)
获取 will 消息
|
public boolean addWillMessage(String clientId, Message message)
IMqttMessageStoreaddWillMessage 在接口中 IMqttMessageStoreclientId - clientIdmessage - messagepublic boolean clearWillMessage(String clientId)
IMqttMessageStoreclearWillMessage 在接口中 IMqttMessageStoreclientId - clientIdpublic Message getWillMessage(String clientId)
IMqttMessageStoregetWillMessage 在接口中 IMqttMessageStoreclientId - clientIdpublic boolean addRetainMessage(String topic, Message message)
IMqttMessageStoreaddRetainMessage 在接口中 IMqttMessageStoretopic - topicmessage - messagepublic boolean clearRetainMessage(String topic)
IMqttMessageStoreclearRetainMessage 在接口中 IMqttMessageStoretopic - topicpublic List<Message> getRetainMessage(String topicFilter)
IMqttMessageStoregetRetainMessage 在接口中 IMqttMessageStoretopicFilter - topicFilterCopyright © 2022. All rights reserved.