Interface Message.Mutable

All Superinterfaces:
java.util.Map<java.lang.String,​java.lang.Object>, Message
All Known Subinterfaces:
ServerMessage.Mutable
All Known Implementing Classes:
HashMapMessage, ServerMessageImpl
Enclosing interface:
Message

public static interface Message.Mutable
extends Message
The mutable version of a Message
  • Method Details

    • getAdvice

      java.util.Map<java.lang.String,​java.lang.Object> getAdvice​(boolean create)
      Convenience method to retrieve the Message.ADVICE_FIELD and create it if it does not exist
      Parameters:
      create - whether to create the advice field if it does not exist
      Returns:
      the advice of the message
    • getDataAsMap

      java.util.Map<java.lang.String,​java.lang.Object> getDataAsMap​(boolean create)
      Convenience method to retrieve the Message.DATA_FIELD and create it if it does not exist
      Parameters:
      create - whether to create the data field if it does not exist
      Returns:
      the data of the message
    • getExt

      java.util.Map<java.lang.String,​java.lang.Object> getExt​(boolean create)
      Convenience method to retrieve the Message.EXT_FIELD and create it if it does not exist
      Parameters:
      create - whether to create the ext field if it does not exist
      Returns:
      the ext of the message
    • setChannel

      void setChannel​(java.lang.String channel)
      Parameters:
      channel - the channel of this message
    • setClientId

      void setClientId​(java.lang.String clientId)
      Parameters:
      clientId - the client id of this message
    • setData

      void setData​(java.lang.Object data)
      Parameters:
      data - the data of this message
    • setId

      void setId​(java.lang.String id)
      Parameters:
      id - the id of this message
    • setSuccessful

      void setSuccessful​(boolean successful)
      Parameters:
      successful - the successfulness of this message