Package org.fusesource.mqtt.codec

Examples of org.fusesource.mqtt.codec.DISCONNECT


        };
       
        // Pop the frame into a request so it we get notified
        // of any failures so we continue to stop the transport.
        if(transport!=null) {
            MQTTFrame frame = new DISCONNECT().encode();
            send(new Request(getNextMessageId(), frame, cb));
        } else {
            cb.onSuccess(null);
        }
    }
View Full Code Here


    }

    @Override
    public void onClose(int closeCode, String message) {
        try {
            protocolConverter.onMQTTCommand(new DISCONNECT().encode());
        } catch (Exception e) {
            LOG.warn("Failed to close WebSocket", e);
        }
    }
View Full Code Here

        try {
            switch (frame.messageType()) {
                case PINGREQ.TYPE: return new PINGREQ().decode(frame).toString();
                case PINGRESP.TYPE: return new PINGRESP().decode(frame).toString();
                case CONNECT.TYPE: return new CONNECT().decode(frame).toString();
                case DISCONNECT.TYPE: return new DISCONNECT().decode(frame).toString();
                case SUBSCRIBE.TYPE: return new SUBSCRIBE().decode(frame).toString();
                case UNSUBSCRIBE.TYPE: return new UNSUBSCRIBE().decode(frame).toString();
                case PUBLISH.TYPE: return new PUBLISH().decode(frame).toString();
                case PUBACK.TYPE: return new PUBACK().decode(frame).toString();
                case PUBREC.TYPE: return new PUBREC().decode(frame).toString();
View Full Code Here

    }

    @Override
    public void onClose(int closeCode, String message) {
        try {
            getProtocolConverter().onMQTTCommand(new DISCONNECT().encode());
        } catch (Exception e) {
            LOG.warn("Failed to close WebSocket", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.fusesource.mqtt.codec.DISCONNECT

Copyright © 2018 www.massapicom. 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.