WebSocketRange增加几个小方法
This commit is contained in:
@@ -35,6 +35,18 @@ public class WebSocketRange implements Serializable {
|
|||||||
this.attach = attach;
|
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() {
|
public String getWskey() {
|
||||||
return wskey;
|
return wskey;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user