Class MQTTStateManager
- java.lang.Object
-
- org.apache.activemq.artemis.core.protocol.mqtt.MQTTStateManager
-
public class MQTTStateManager extends Object
-
-
Method Summary
-
-
-
Method Detail
-
getInstance
public static MQTTStateManager getInstance(org.apache.activemq.artemis.core.server.ActiveMQServer server) throws Exception
- Throws:
Exception
-
removeInstance
public static void removeInstance(org.apache.activemq.artemis.core.server.ActiveMQServer server)
-
scanSessions
public void scanSessions()
-
getSessionState
public MQTTSessionState getSessionState(String clientId) throws Exception
- Throws:
Exception
-
removeSessionState
public MQTTSessionState removeSessionState(String clientId) throws Exception
- Throws:
Exception
-
removeDurableSessionState
public void removeDurableSessionState(String clientId) throws Exception
- Throws:
Exception
-
getSessionStates
public Map<String,MQTTSessionState> getSessionStates()
-
storeSessionState
public void storeSessionState(MQTTSessionState state) throws Exception
- Throws:
Exception
-
serializeState
public static org.apache.activemq.artemis.core.message.impl.CoreMessage serializeState(MQTTSessionState state, long messageID)
-
isClientConnected
public boolean isClientConnected(String clientId, MQTTConnection connection)
-
isClientConnected
public boolean isClientConnected(String clientId)
-
removeConnectedClient
public void removeConnectedClient(String clientId)
-
addConnectedClient
public MQTTConnection addConnectedClient(String clientId, MQTTConnection connection)
- Parameters:
clientId-connection-- Returns:
- the
MQTTConnectionthat the added connection replaced or null if there was no previous entry for theclientId
-
getConnectedClient
public MQTTConnection getConnectedClient(String clientId)
-
getConnectedClients
public Map<String,MQTTConnection> getConnectedClients()
For DEBUG only
-
-