Class MqttProperties

java.lang.Object
io.netty.handler.codec.mqtt.MqttProperties

public final class MqttProperties extends Object
MQTT Properties container
  • Field Details

  • Constructor Details

    • MqttProperties

      public MqttProperties()
    • MqttProperties

      private MqttProperties(boolean canModify)
  • Method Details

    • withEmptyDefaults

      static MqttProperties withEmptyDefaults(MqttProperties properties)
    • add

      public void add(MqttProperties.MqttProperty property)
    • listAll

      public Collection<? extends MqttProperties.MqttProperty> listAll()
    • isEmpty

      public boolean isEmpty()
    • getProperty

      public MqttProperties.MqttProperty getProperty(int propertyId)
      Get property by ID. If there are multiple properties of this type (can be with Subscription ID) then return the first one.
      Parameters:
      propertyId - ID of the property
      Returns:
      a property if it is set, null otherwise
    • getProperties

      public List<? extends MqttProperties.MqttProperty> getProperties(int propertyId)
      Get properties by ID. Some properties (Subscription ID and User Properties) may occur multiple times, this method returns all their values in order.
      Parameters:
      propertyId - ID of the property
      Returns:
      all properties having specified ID