Class RedisParsableMessage
java.lang.Object
net.swofty.redisapi.util.RedisParsableMessage
This utility class is used for sending JSONObjects over Redis instead of working with raw Strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RedisParsableMessagestatic RedisParsableMessagebuild(org.json.JSONObject obj) Formats the RedisParsableMessage into a string to be sent through Redis<T> TbooleangetBoolean(String key) org.json.JSONArraygetJsonArray(String key) getStringList(String key) static RedisParsableMessageWraps Redis messages intoRedisParsableMessagemaking it effectively aJSONObject
-
Constructor Details
-
RedisParsableMessage
protected RedisParsableMessage(org.json.JSONObject json)
-
-
Method Details
-
build
-
build
-
parse
Wraps Redis messages intoRedisParsableMessagemaking it effectively aJSONObject- Parameters:
raw- the raw message to parse- Returns:
- a
RedisParsableMessage
-
formatForSend
Formats the RedisParsableMessage into a string to be sent through Redis- Returns:
- the "serialized" version of this class
-
get
-
getUUID
-
getJsonArray
-
getStringList
-
getBoolean
-