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 Details

    • 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