Interface JsonChannelMessage
-
- All Superinterfaces:
JsonMessage
,Message
public interface JsonChannelMessage extends JsonMessage
Provides an interface for receiving JSON Channel messages in anJsonChannel
to allow json communication while avoiding having to deal with additional metadata contained in the packet.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getContribUser()
Grabs the string value of the user who has contributed from the Json message metadata<T> T
getJsonAsType(Class<T> jsonType)
Returns the object JSON deserialized into a class of type which is passed in as jsonTypevoid
setJsonTree(Object jsonTree)
Set the JsonObject in the Message to the given value-
Methods inherited from interface com.caplin.datasource.messaging.json.JsonMessage
getJson, getJsonObject, isPatch
-
Methods inherited from interface com.caplin.datasource.messaging.Message
getMessageType, getSubject, isImage, setImage
-
-
-
-
Method Detail
-
getJsonAsType
<T> T getJsonAsType(Class<T> jsonType) throws Exception
Returns the object JSON deserialized into a class of type which is passed in as jsonType- Type Parameters:
T
- the generic return type- Parameters:
jsonType
- the class which we deserialize intp- Returns:
- the deserialized json class
- Throws:
Exception
-
getContribUser
String getContribUser() throws Exception
Grabs the string value of the user who has contributed from the Json message metadata- Returns:
- the contribUser value as String
- Throws:
Exception
-
setJsonTree
void setJsonTree(Object jsonTree)
Set the JsonObject in the Message to the given value- Parameters:
jsonTree
- the json object to be set
-
-