Class InMemoryMqttMessageStore
- java.lang.Object
-
- br.com.anteros.mqtt.core.server.store.InMemoryMqttMessageStore
-
- All Implemented Interfaces:
IMqttMessageStore
public class InMemoryMqttMessageStore extends Object implements IMqttMessageStore
message store- Author:
- L.cm
-
-
Constructor Summary
Constructors Constructor Description InMemoryMqttMessageStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddRetainMessage(String topic, br.com.anteros.mqtt.core.server.model.Message message)存储 retain 消息booleanaddWillMessage(String clientId, br.com.anteros.mqtt.core.server.model.Message message)存储 clientId 的遗嘱消息booleanclearRetainMessage(String topic)清理该 topic 的 retain 消息booleanclearWillMessage(String clientId)清理该 clientId 的遗嘱消息List<br.com.anteros.mqtt.core.server.model.Message>getRetainMessage(String topicFilter)获取所有 retain 消息br.com.anteros.mqtt.core.server.model.MessagegetWillMessage(String clientId)获取 will 消息
-
-
-
Method Detail
-
addWillMessage
public boolean addWillMessage(String clientId, br.com.anteros.mqtt.core.server.model.Message message)
Description copied from interface:IMqttMessageStore存储 clientId 的遗嘱消息- Specified by:
addWillMessagein interfaceIMqttMessageStore- Parameters:
clientId- clientIdmessage- message- Returns:
- boolean
-
clearWillMessage
public boolean clearWillMessage(String clientId)
Description copied from interface:IMqttMessageStore清理该 clientId 的遗嘱消息- Specified by:
clearWillMessagein interfaceIMqttMessageStore- Parameters:
clientId- clientId- Returns:
- boolean
-
getWillMessage
public br.com.anteros.mqtt.core.server.model.Message getWillMessage(String clientId)
Description copied from interface:IMqttMessageStore获取 will 消息- Specified by:
getWillMessagein interfaceIMqttMessageStore- Parameters:
clientId- clientId- Returns:
- Message
-
addRetainMessage
public boolean addRetainMessage(String topic, br.com.anteros.mqtt.core.server.model.Message message)
Description copied from interface:IMqttMessageStore存储 retain 消息- Specified by:
addRetainMessagein interfaceIMqttMessageStore- Parameters:
topic- topicmessage- message- Returns:
- boolean
-
clearRetainMessage
public boolean clearRetainMessage(String topic)
Description copied from interface:IMqttMessageStore清理该 topic 的 retain 消息- Specified by:
clearRetainMessagein interfaceIMqttMessageStore- Parameters:
topic- topic- Returns:
- boolean
-
getRetainMessage
public List<br.com.anteros.mqtt.core.server.model.Message> getRetainMessage(String topicFilter)
Description copied from interface:IMqttMessageStore获取所有 retain 消息- Specified by:
getRetainMessagein interfaceIMqttMessageStore- Parameters:
topicFilter- topicFilter- Returns:
- Message
-
-