Class MqttPublishMessage

java.lang.Object
io.vertx.mutiny.mqtt.messages.MqttPublishMessage
All Implemented Interfaces:
MutinyDelegate, MqttMessage

public class MqttPublishMessage extends Object implements MqttMessage, MutinyDelegate
Represents an MQTT PUBLISH message

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

See Also:
  • MqttPublishMessage
  • Field Details

  • Constructor Details

    • MqttPublishMessage

      public MqttPublishMessage(io.vertx.mqtt.messages.MqttPublishMessage delegate)
      Create a new instance of MqttPublishMessage delegating to the given (non-null) instance of MqttPublishMessage.
    • MqttPublishMessage

      public MqttPublishMessage(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.mqtt.messages.MqttPublishMessage getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MqttMessage
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • create

      public static MqttPublishMessage create(int messageId, io.netty.handler.codec.mqtt.MqttQoS qosLevel, boolean isDup, boolean isRetain, String topicName, io.vertx.core.buffer.Buffer payload, io.netty.handler.codec.mqtt.MqttProperties properties)
      Create a concrete instance of a Vert.x publish message
      Parameters:
      messageId - message identifier
      qosLevel - quality of service level
      isDup - if the message is a duplicate
      isRetain - if the message needs to be retained
      topicName - topic on which the message was published
      payload - payload message
      properties - message properties
      Returns:
      Vert.x publish message
    • qosLevel

      public io.netty.handler.codec.mqtt.MqttQoS qosLevel()
      Returns:
      Quality of service level
    • isDup

      public boolean isDup()
      Returns:
      If the message is a duplicate
    • isRetain

      public boolean isRetain()
      Returns:
      If the message needs to be retained
    • topicName

      public String topicName()
      Returns:
      Topic on which the message was published
    • payload

      public io.vertx.core.buffer.Buffer payload()
      Returns:
      Payload message
    • ack

      public void ack()
      Send the PUBACK/PUBCOMP to the broker. Use this method only if autoAck option is set to false.
    • properties

      public io.netty.handler.codec.mqtt.MqttProperties properties()
      Returns:
      MQTT properties
    • messageId

      public int messageId()
      Specified by:
      messageId in interface MqttMessage
      Returns:
      Message identifier
    • newInstance

      public static MqttPublishMessage newInstance(io.vertx.mqtt.messages.MqttPublishMessage delegate)
      Creates a new instance of the MqttPublishMessage.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object