Package io.moquette.broker
Class Utils
- java.lang.Object
-
- io.moquette.broker.Utils
-
public final class Utils extends Object
Utility static methods, like Map get with default value, or elvis operator.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,K>
TdefaultGet(Map<K,T> map, K key, T defaultValue)static intmessageId(io.netty.handler.codec.mqtt.MqttMessage msg)static byte[]readBytesAndRewind(io.netty.buffer.ByteBuf payload)
-
-
-
Method Detail
-
defaultGet
public static <T,K> T defaultGet(Map<K,T> map, K key, T defaultValue)
-
messageId
public static int messageId(io.netty.handler.codec.mqtt.MqttMessage msg)
-
readBytesAndRewind
public static byte[] readBytesAndRewind(io.netty.buffer.ByteBuf payload)
-
-