Class MQTTPacketIdGenerator
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.transport.mqtt.MQTTPacketIdGenerator
-
- All Implemented Interfaces:
Service
public class MQTTPacketIdGenerator extends ServiceSupport
Manages PUBLISH packet ids for clients.- Author:
- Dhiraj Bokde
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ackPacketId(String clientId, short packetId)
protected void
doStart()
protected void
doStop(ServiceStopper stopper)
static MQTTPacketIdGenerator
getMQTTPacketIdGenerator(BrokerService broker)
short
getNextSequenceId(String clientId)
short
setPacketId(String clientId, MQTTSubscription subscription, ActiveMQMessage message, org.fusesource.mqtt.codec.PUBLISH publish)
void
startClientSession(String clientId)
boolean
stopClientSession(String clientId)
-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
-
-
-
-
Method Detail
-
doStop
protected void doStop(ServiceStopper stopper) throws Exception
- Specified by:
doStop
in classServiceSupport
- Throws:
Exception
-
doStart
protected void doStart() throws Exception
- Specified by:
doStart
in classServiceSupport
- Throws:
Exception
-
startClientSession
public void startClientSession(String clientId)
-
stopClientSession
public boolean stopClientSession(String clientId)
-
setPacketId
public short setPacketId(String clientId, MQTTSubscription subscription, ActiveMQMessage message, org.fusesource.mqtt.codec.PUBLISH publish)
-
ackPacketId
public void ackPacketId(String clientId, short packetId)
-
getNextSequenceId
public short getNextSequenceId(String clientId)
-
getMQTTPacketIdGenerator
public static MQTTPacketIdGenerator getMQTTPacketIdGenerator(BrokerService broker)
-
-