UserProperties Class — netty Architecture
Architecture documentation for the UserProperties class in MqttProperties.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD bc9a1fe5_31cf_4619_5647_c3cbc5d7bcaf["UserProperties"] 5a4eca03_eb27_9264_bded_20eb1e48fedb["MqttProperties.java"] bc9a1fe5_31cf_4619_5647_c3cbc5d7bcaf -->|defined in| 5a4eca03_eb27_9264_bded_20eb1e48fedb 0abc27f1_a211_9167_53c8_e86bb18d9b01["UserProperties()"] bc9a1fe5_31cf_4619_5647_c3cbc5d7bcaf -->|method| 0abc27f1_a211_9167_53c8_e86bb18d9b01 19809981_1e50_2fe2_4c0d_bac116bd116a["add()"] bc9a1fe5_31cf_4619_5647_c3cbc5d7bcaf -->|method| 19809981_1e50_2fe2_4c0d_bac116bd116a e6add728_4905_da29_7e65_8e26ee612d6c["String()"] bc9a1fe5_31cf_4619_5647_c3cbc5d7bcaf -->|method| e6add728_4905_da29_7e65_8e26ee612d6c
Relationship Graph
Source Code
codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttProperties.java lines 255–300
public static final class UserProperties extends MqttProperty<List<StringPair>> {
public UserProperties() {
super(USER_PROPERTY, new ArrayList<>());
}
/**
* Create user properties from the collection of the String pair values
*
* @param values string pairs. Collection entries are copied, collection itself isn't shared
*/
public UserProperties(Collection<StringPair> values) {
this();
this.value.addAll(values);
}
private static UserProperties fromUserPropertyCollection(Collection<UserProperty> properties) {
UserProperties userProperties = new UserProperties();
for (UserProperty property: properties) {
userProperties.add(new StringPair(property.value.key, property.value.value));
}
return userProperties;
}
public void add(StringPair pair) {
this.value.add(pair);
}
public void add(String key, String value) {
this.value.add(new StringPair(key, value));
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder("UserProperties(");
boolean first = true;
for (StringPair pair: value) {
if (!first) {
builder.append(", ");
}
builder.append(pair.key + "->" + pair.value);
first = false;
}
builder.append(")");
return builder.toString();
}
}
Source
Frequently Asked Questions
What is the UserProperties class?
UserProperties is a class in the netty codebase, defined in codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttProperties.java.
Where is UserProperties defined?
UserProperties is defined in codec-mqtt/src/main/java/io/netty/handler/codec/mqtt/MqttProperties.java at line 255.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free