Package org.fusesource.mqtt.codec

Examples of org.fusesource.mqtt.codec.PUBLISH.qos()


    }

    PUBLISH createPublish(ActiveMQMessage message) throws DataFormatException, IOException, JMSException {
        PUBLISH publish = protocolConverter.convertMessage(message);
        if (publish.qos().ordinal() > this.qos.ordinal()) {
            publish.qos(this.qos);
        }
        return publish;
    }

    public boolean expectAck() {
View Full Code Here


        return new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
    }

    PUBLISH createPublish(ActiveMQMessage message) throws DataFormatException, IOException, JMSException {
        PUBLISH publish = protocolConverter.convertMessage(message);
        if (publish.qos().ordinal() > this.qos.ordinal()) {
            publish.qos(this.qos);
        }
        return publish;
    }
View Full Code Here

            qoS = QoS.values()[ordinal];

        } else {
            qoS = message.isPersistent() ? QoS.AT_MOST_ONCE : QoS.AT_LEAST_ONCE;
        }
        result.qos(qoS);

        UTF8Buffer topicName;
        synchronized (mqttTopicMap) {
            topicName = mqttTopicMap.get(message.getJMSDestination());
            if (topicName == null) {
View Full Code Here

        if (connect != null) {
            if (connect.willTopic() != null && connect.willMessage() != null) {
                try {
                    PUBLISH publish = new PUBLISH();
                    publish.topicName(connect.willTopic());
                    publish.qos(connect.willQos());
                    publish.payload(connect.willMessage());
                    ActiveMQMessage message = convertMessage(publish);
                    message.setProducerId(producerId);
                    message.onSend();
                    sendToActiveMQ(message, null);
View Full Code Here

            qoS = QoS.values()[ordinal];

        } else {
            qoS = message.isPersistent() ? QoS.AT_MOST_ONCE : QoS.AT_LEAST_ONCE;
        }
        result.qos(qoS);

        UTF8Buffer topicName;
        synchronized (mqttTopicMap) {
            topicName = mqttTopicMap.get(message.getJMSDestination());
            if (topicName == null) {
View Full Code Here

        if (connect != null) {
            if (connected.get() && connect.willTopic() != null && connect.willMessage() != null) {
                try {
                    PUBLISH publish = new PUBLISH();
                    publish.topicName(connect.willTopic());
                    publish.qos(connect.willQos());
                    publish.payload(connect.willMessage());
                    ActiveMQMessage message = convertMessage(publish);
                    message.setProducerId(producerId);
                    message.onSend();
                    sendToActiveMQ(message, null);
View Full Code Here

        if (connect != null) {
            if (connected.get() && connect.willTopic() != null && connect.willMessage() != null) {
                try {
                    PUBLISH publish = new PUBLISH();
                    publish.topicName(connect.willTopic());
                    publish.qos(connect.willQos());
                    publish.payload(connect.willMessage());
                    ActiveMQMessage message = convertMessage(publish);
                    message.setProducerId(producerId);
                    message.onSend();
                    sendToActiveMQ(message, null);
View Full Code Here

            qoS = QoS.values()[ordinal];

        } else {
            qoS = message.isPersistent() ? QoS.AT_MOST_ONCE : QoS.AT_LEAST_ONCE;
        }
        result.qos(qoS);

        UTF8Buffer topicName;
        synchronized (mqttTopicMap) {
            topicName = mqttTopicMap.get(message.getJMSDestination());
            if (topicName == null) {
View Full Code Here

        return new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
    }

    PUBLISH createPublish(ActiveMQMessage message) throws DataFormatException, IOException, JMSException {
        PUBLISH publish = protocolConverter.convertMessage(message);
        if (publish.qos().ordinal() > this.qos.ordinal()) {
            publish.qos(this.qos);
        }
        return publish;
    }
View Full Code Here

    }

    PUBLISH createPublish(ActiveMQMessage message) throws DataFormatException, IOException, JMSException {
        PUBLISH publish = protocolConverter.convertMessage(message);
        if (publish.qos().ordinal() > this.qos.ordinal()) {
            publish.qos(this.qos);
        }
        return publish;
    }

    public boolean expectAck(PUBLISH publish) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.