Package io.netty.handler.codec.mqtt
Class MqttProperties
- java.lang.Object
-
- io.netty.handler.codec.mqtt.MqttProperties
-
public final class MqttProperties extends java.lang.ObjectMQTT Properties container
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMqttProperties.BinaryPropertystatic classMqttProperties.IntegerPropertystatic classMqttProperties.MqttProperty<T>MQTT property base classstatic classMqttProperties.MqttPropertyTypeDeprecated.static classMqttProperties.StringPairstatic classMqttProperties.StringPropertystatic classMqttProperties.UserPropertiesstatic classMqttProperties.UserProperty
-
Field Summary
Fields Modifier and Type Field Description static MqttPropertiesNO_PROPERTIES
-
Constructor Summary
Constructors Constructor Description MqttProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(MqttProperties.MqttProperty property)java.util.List<? extends MqttProperties.MqttProperty>getProperties(int propertyId)Get properties by ID.MqttProperties.MqttPropertygetProperty(int propertyId)Get property by ID.booleanisEmpty()java.util.Collection<? extends MqttProperties.MqttProperty>listAll()
-
-
-
Field Detail
-
NO_PROPERTIES
public static final MqttProperties NO_PROPERTIES
-
-
Method Detail
-
add
public void add(MqttProperties.MqttProperty property)
-
listAll
public java.util.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 java.util.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
-
-