Package it.polimi.ingsw.controller
Class Message
java.lang.Object
it.polimi.ingsw.controller.Message
- All Implemented Interfaces:
Serializable
class which represent the messages that will be exchanged within the network
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMessage
(MessageType t, String p, Object cont) normal constructor for the Messages that will be sent in the network -
Method Summary
Modifier and TypeMethodDescriptiongetter for the author of the messagegetter for the content of the messagegetType()
getter for the type of the message
-
Constructor Details
-
Message
normal constructor for the Messages that will be sent in the network- Parameters:
t
- the type of this messagep
- the sender of the message (name)cont
- the content of the message, any type of class (Object)
-
-
Method Details
-
getType
getter for the type of the message- Returns:
- the type of message sent, which identify his purpose
-
getAuthor
getter for the author of the message- Returns:
- the author of message sent, client or server
-
getContent
getter for the content of the message- Returns:
- the content of message sent, which will be converted to the appropriate class
-