public MQTTFrame encode() { try { DataByteArrayOutputStream os = new DataByteArrayOutputStream(2); os.writeShort(messageId); MQTTFrame frame = new MQTTFrame(); frame.commandType(messageType()); return frame.buffer(os.toBuffer()); } catch (IOException e) { throw new RuntimeException("The impossible happened"); } }
@Override public PUBCOMP decode(MQTTFrame frame) throws ProtocolException { return (PUBCOMP) super.decode(frame); }
@Override public PUBREC decode(MQTTFrame frame) throws ProtocolException { return (PUBREC) super.decode(frame); }
@Override public PUBACK decode(MQTTFrame frame) throws ProtocolException { return (PUBACK) super.decode(frame); }
@Override public PUBCOMP messageId(short messageId) { return (PUBCOMP) super.messageId(messageId); }
@Override public UNSUBACK decode(MQTTFrame frame) throws ProtocolException { return (UNSUBACK) super.decode(frame); }
@Override public PUBACK messageId(short messageId) { return (PUBACK) super.messageId(messageId); } }
public MQTTFrame encode() { try { DataByteArrayOutputStream os = new DataByteArrayOutputStream(2); os.writeShort(messageId); MQTTFrame frame = new MQTTFrame(); frame.commandType(messageType()); return frame.buffer(os.toBuffer()); } catch (IOException e) { throw new RuntimeException("The impossible happened"); } }
@Override public PUBREC messageId(short messageId) { return (PUBREC) super.messageId(messageId); }
@Override public UNSUBACK messageId(short messageId) { return (UNSUBACK) super.messageId(messageId); } }
@Override public PUBREC decode(MQTTFrame frame) throws ProtocolException { return (PUBREC) super.decode(frame); }
@Override public PUBREC messageId(short messageId) { return (PUBREC) super.messageId(messageId); }
@Override public PUBCOMP decode(MQTTFrame frame) throws ProtocolException { return (PUBCOMP) super.decode(frame); }
@Override public PUBACK decode(MQTTFrame frame) throws ProtocolException { return (PUBACK) super.decode(frame); }
@Override public PUBCOMP messageId(short messageId) { return (PUBCOMP) super.messageId(messageId); }
@Override public UNSUBACK decode(MQTTFrame frame) throws ProtocolException { return (UNSUBACK) super.decode(frame); }
@Override public PUBACK messageId(short messageId) { return (PUBACK) super.messageId(messageId); } }
@Override public UNSUBACK messageId(short messageId) { return (UNSUBACK) super.messageId(messageId); } }