WebSocketRange增加几个小方法

This commit is contained in:
Redkale
2020-01-07 10:21:01 +08:00
parent 55ab279e7f
commit 4d3d73b4c1

View File

@@ -35,6 +35,18 @@ public class WebSocketRange implements Serializable {
this.attach = attach;
}
public boolean containsAttach(String key) {
return this.attach == null ? false : this.attach.containsKey(key);
}
public String getAttach(String key) {
return this.attach == null ? null : this.attach.get(key);
}
public String getAttach(String key, String defval) {
return this.attach == null ? defval : this.attach.getOrDefault(key, defval);
}
public String getWskey() {
return wskey;
}