java.lang.Object
it.polimi.ingsw.network.message.Message
- Direct Known Subclasses:
MessageFromClientToServer
,MessageFromServerToClient
public abstract class Message
extends java.lang.Object
Abstract message
message has, in any case, two attributes:
- username: a String, containing the sender's username
- type: an Enum value, which indicates what kind of payload to expect
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Type
getType()
type getterjava.lang.String
getUsername()
username getter
-
Constructor Details
-
Message
Message constructor- Parameters:
username
- the sender's usernametype
- the message type
-
-
Method Details
-
getUsername
public java.lang.String getUsername()username getter- Returns:
- the sender's username
-
getType
type getter- Returns:
- the message type
-