Class MqttHeaderAccessor

java.lang.Object
org.springframework.integration.mqtt.support.MqttHeaderAccessor

public final class MqttHeaderAccessor extends Object
Helper for typed access to incoming MQTT message headers.
Since:
5.3
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable Boolean
    duplicate(org.springframework.messaging.Message<?> message)
    Return the duplicate header.
    static @Nullable Integer
    id(org.springframework.messaging.Message<?> message)
    Return the MQTT message id.
    static @Nullable Integer
    receivedQos(org.springframework.messaging.Message<?> message)
    Return the received QOS header.
    static @Nullable Boolean
    receivedRetained(org.springframework.messaging.Message<?> message)
    Return the received retained header.
    static @Nullable String
    receivedTopic(org.springframework.messaging.Message<?> message)
    Return the received topic header.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • receivedTopic

      public static @Nullable String receivedTopic(org.springframework.messaging.Message<?> message)
      Return the received topic header.
      Parameters:
      message - the message.
      Returns:
      the header.
    • id

      public static @Nullable Integer id(org.springframework.messaging.Message<?> message)
      Return the MQTT message id.
      Parameters:
      message - the message.
      Returns:
      the header.
    • receivedQos

      public static @Nullable Integer receivedQos(org.springframework.messaging.Message<?> message)
      Return the received QOS header.
      Parameters:
      message - the message.
      Returns:
      the header.
    • receivedRetained

      public static @Nullable Boolean receivedRetained(org.springframework.messaging.Message<?> message)
      Return the received retained header.
      Parameters:
      message - the message.
      Returns:
      the header.
    • duplicate

      public static @Nullable Boolean duplicate(org.springframework.messaging.Message<?> message)
      Return the duplicate header.
      Parameters:
      message - the message.
      Returns:
      the header.