Package io.netty.handler.codec.mqtt
Class MqttProperties
- java.lang.Object
-
- io.netty.handler.codec.mqtt.MqttProperties
-
public final class MqttProperties extends java.lang.Object
MQTT Properties container
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MqttProperties.BinaryProperty
static class
MqttProperties.IntegerProperty
static class
MqttProperties.MqttProperty<T>
MQTT property base classstatic class
MqttProperties.MqttPropertyType
static class
MqttProperties.StringPair
static class
MqttProperties.StringProperty
static class
MqttProperties.UserProperties
static class
MqttProperties.UserProperty
-
Field Summary
Fields Modifier and Type Field Description static MqttProperties
NO_PROPERTIES
-
Constructor Summary
Constructors Constructor Description MqttProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(MqttProperties.MqttProperty property)
java.util.List<? extends MqttProperties.MqttProperty>
getProperties(int propertyId)
Get properties by ID.MqttProperties.MqttProperty
getProperty(int propertyId)
Get property by ID.boolean
isEmpty()
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
-
-