Class Message

java.lang.Object
it.polimi.ingsw.controller.Message
All Implemented Interfaces:
Serializable

public class Message extends Object implements Serializable
class which represent the messages that will be exchanged within the network
See Also:
  • Constructor Details

    • Message

      public Message(MessageType t, String p, Object cont)
      normal constructor for the Messages that will be sent in the network
      Parameters:
      t - the type of this message
      p - the sender of the message (name)
      cont - the content of the message, any type of class (Object)
  • Method Details

    • getType

      public MessageType getType()
      getter for the type of the message
      Returns:
      the type of message sent, which identify his purpose
    • getAuthor

      public String getAuthor()
      getter for the author of the message
      Returns:
      the author of message sent, client or server
    • getContent

      public Object getContent()
      getter for the content of the message
      Returns:
      the content of message sent, which will be converted to the appropriate class