Interface JsonChannelMessage

  • All Superinterfaces:
    JsonMessage, Message

    public interface JsonChannelMessage
    extends JsonMessage
    Provides an interface for receiving JSON Channel messages in an JsonChannel to allow json communication while avoiding having to deal with additional metadata contained in the packet.
    • Method Detail

      • getJsonAsType

        <T> T getJsonAsType​(java.lang.Class<T> jsonType)
                     throws java.lang.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:
        java.lang.Exception
      • getContribUser

        java.lang.String getContribUser()
                                 throws java.lang.Exception
        Grabs the string value of the user who has contributed from the Json message metadata
        Returns:
        the contribUser value as String
        Throws:
        java.lang.Exception
      • setJsonTree

        void setJsonTree​(java.lang.Object jsonTree)
        Set the JsonObject in the Message to the given value
        Parameters:
        jsonTree - the json object to be set