Class CMMqttEvent

Direct Known Subclasses:
CMMqttEventFixedHeader

public abstract class CMMqttEvent extends CMEvent
This class represents CM events that belong to the MQTT control packets.
  • Field Details

    • CONNECT

      public static final int CONNECT
      Event ID of the CMMqttEventCONNECT class.
      See Also:
    • CONNACK

      public static final int CONNACK
      Event ID of the CMMqttEventCONNACK class.
      See Also:
    • PUBLISH

      public static final int PUBLISH
      Event ID of the CMMqttEventPUBLISH class.
      See Also:
    • PUBACK

      public static final int PUBACK
      Event ID of the CMMqttEventPUBACK class.
      See Also:
    • PUBREC

      public static final int PUBREC
      Event ID of the CMMqttEventPUBREC class.
      See Also:
    • PUBREL

      public static final int PUBREL
      Event ID of the CMMqttEventPUBREL class.
      See Also:
    • PUBCOMP

      public static final int PUBCOMP
      Event ID of the CMMqttEventPUBCOMP class.
      See Also:
    • SUBSCRIBE

      public static final int SUBSCRIBE
      Event ID of the CMMqttEventSUBSCRIBE class.
      See Also:
    • SUBACK

      public static final int SUBACK
      Event ID of the CMMqttEventSUBACK class.
      See Also:
    • UNSUBSCRIBE

      public static final int UNSUBSCRIBE
      Event ID of the CMMqttEventUNSUBSCRIBE class.
      See Also:
    • UNSUBACK

      public static final int UNSUBACK
      Event ID of the CMMqttEventUNSUBACK class.
      See Also:
    • PINGREQ

      public static final int PINGREQ
      Event ID of the CMMqttEventPINGREQ class.
      See Also:
    • PINGRESP

      public static final int PINGRESP
      Event ID of the CMMqttEventPINGRESP class.
      See Also:
    • DISCONNECT

      public static final int DISCONNECT
      Event ID of the CMMqttEventDISCONNECT class.
      See Also:
  • Constructor Details

    • CMMqttEvent

      public CMMqttEvent()
    • CMMqttEvent

      public CMMqttEvent(ByteBuffer msg)
  • Method Details

    • getFixedHeaderByteNum

      protected abstract int getFixedHeaderByteNum()
    • marshallFixedHeader

      protected abstract void marshallFixedHeader()
    • unmarshallFixedHeader

      protected abstract void unmarshallFixedHeader(ByteBuffer buf)
    • getVarHeaderByteNum

      protected abstract int getVarHeaderByteNum()
    • marshallVarHeader

      protected abstract void marshallVarHeader()
    • unmarshallVarHeader

      protected abstract void unmarshallVarHeader(ByteBuffer buf)
    • getPayloadByteNum

      protected abstract int getPayloadByteNum()
    • marshallPayload

      protected abstract void marshallPayload()
    • unmarshallPayload

      protected abstract void unmarshallPayload(ByteBuffer buf)
    • toString

      public String toString()
      returns the string representation of this CMMqttEvent object.
      Overrides:
      toString in class CMEvent
      Returns:
      string of this object.
    • getByteNum

      protected int getByteNum()
      Overrides:
      getByteNum in class CMEvent
    • marshallBody

      protected void marshallBody()
      Specified by:
      marshallBody in class CMEvent
    • unmarshallBody

      protected void unmarshallBody(ByteBuffer buf)
      Specified by:
      unmarshallBody in class CMEvent
    • getPacketID

      public int getPacketID()