public class MQTTSubscription extends Object
| Constructor and Description |
|---|
MQTTSubscription(MQTTProtocolConverter protocolConverter,
String topicName,
org.fusesource.mqtt.client.QoS qos,
ConsumerInfo consumerInfo) |
| Modifier and Type | Method and Description |
|---|---|
MessageAck |
createMessageAck(MessageDispatch md)
Create a
MessageAck that will acknowledge the given MessageDispatch. |
org.fusesource.mqtt.codec.PUBLISH |
createPublish(ActiveMQMessage message)
Creates a PUBLISH command that can be sent to a remote client from an
incoming
ActiveMQMessage instance. |
boolean |
expectAck(org.fusesource.mqtt.codec.PUBLISH publish)
Given a PUBLISH command determine if it will expect an ACK based on the
QoS of the Publish command and the QoS of this subscription.
|
ConsumerInfo |
getConsumerInfo()
Gets the
ConsumerInfo that describes the subscription sent to ActiveMQ. |
ActiveMQDestination |
getDestination()
The real
ActiveMQDestination that this subscription is assigned. |
org.fusesource.mqtt.client.QoS |
getQoS() |
String |
getTopicName() |
String |
toString() |
public MQTTSubscription(MQTTProtocolConverter protocolConverter, String topicName, org.fusesource.mqtt.client.QoS qos, ConsumerInfo consumerInfo)
public MessageAck createMessageAck(MessageDispatch md)
MessageAck that will acknowledge the given MessageDispatch.md - the MessageDispatch to acknowledge.MessageAck command to acknowledge the message.public org.fusesource.mqtt.codec.PUBLISH createPublish(ActiveMQMessage message) throws DataFormatException, IOException, JMSException
ActiveMQMessage instance.message - the message to convert to a PUBLISH command.ActiveMQMessage.DataFormatExceptionIOExceptionJMSExceptionpublic boolean expectAck(org.fusesource.mqtt.codec.PUBLISH publish)
publish - The publish command to inspect.public String getTopicName()
public ActiveMQDestination getDestination()
ActiveMQDestination that this subscription is assigned.ActiveMQDestination assigned to this subscription.public ConsumerInfo getConsumerInfo()
ConsumerInfo that describes the subscription sent to ActiveMQ.ConsumerInfo used to create this subscription.public org.fusesource.mqtt.client.QoS getQoS()
Copyright © 2005–2015 FuseSource, Corp.. All rights reserved.