io.netty.handler.codec.mqtt

## Class MqttProperties

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

    public final class MqttProperties
    extends Object

MQTT Properties container

### Nested Class Summary

Nested Classes
`static class` `MqttProperties.BinaryProperty`
`static class` `MqttProperties.IntegerProperty`
`static class` `MqttProperties.MqttProperty<T>` MQTT property base class
`static class` `MqttProperties.MqttPropertyType`
`static class` `MqttProperties.StringPair`
`static class` `MqttProperties.StringProperty`
`static class` `MqttProperties.UserProperties`
`static class` `MqttProperties.UserProperty`

### Field Summary

Fields
`static MqttProperties` `NO_PROPERTIES`

### Constructor Summary

Constructors
Constructor and Description
`MqttProperties()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(MqttProperties.MqttProperty property)`
`List<? extends MqttProperties.MqttProperty>` `getProperties(int propertyId)` Get properties by ID.
`MqttProperties.MqttProperty` `getProperty(int propertyId)` Get property by ID.
`boolean` `isEmpty()`
`Collection<? extends MqttProperties.MqttProperty>` `listAll()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### NO_PROPERTIES

    public static final MqttProperties NO_PROPERTIES

### Constructor Detail

#### MqttProperties

    public MqttProperties()

### Method Detail

#### 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