public class MQTTSubscription extends Object
Constructor and Description |
---|
MQTTSubscription(MQTTProtocolConverter protocolConverter,
String topicName,
org.fusesource.mqtt.client.QoS qos,
org.apache.activemq.command.ConsumerInfo consumerInfo) |
Modifier and Type | Method and Description |
---|---|
org.apache.activemq.command.MessageAck |
createMessageAck(org.apache.activemq.command.MessageDispatch md)
Create a
MessageAck that will acknowledge the given MessageDispatch . |
org.fusesource.mqtt.codec.PUBLISH |
createPublish(org.apache.activemq.command.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.
|
org.apache.activemq.command.ConsumerInfo |
getConsumerInfo()
Gets the
ConsumerInfo that describes the subscription sent to ActiveMQ. |
org.apache.activemq.command.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, org.apache.activemq.command.ConsumerInfo consumerInfo)
public org.apache.activemq.command.MessageAck createMessageAck(org.apache.activemq.command.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(org.apache.activemq.command.ActiveMQMessage message) throws DataFormatException, IOException, javax.jms.JMSException
ActiveMQMessage
instance.message
- the message to convert to a PUBLISH command.ActiveMQMessage
.DataFormatException
IOException
javax.jms.JMSException
public boolean expectAck(org.fusesource.mqtt.codec.PUBLISH publish)
publish
- The publish command to inspect.public String getTopicName()
public org.apache.activemq.command.ActiveMQDestination getDestination()
ActiveMQDestination
that this subscription is assigned.ActiveMQDestination
assigned to this subscription.public org.apache.activemq.command.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–2019 FuseSource, Corp.. All rights reserved.