public class Message
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Message(java.lang.Object content,
MessageType type,
Agent sender)
Instantiates a new message.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getContent()
Gets the content.
|
Agent |
getSender()
Gets the sender.
|
MessageType |
getType()
Gets the type.
|
void |
setContent(java.lang.Object content)
Sets the content.
|
void |
setSender(Agent sender)
Sets the sender.
|
void |
setType(MessageType type)
Sets the type.
|
public Message(java.lang.Object content, MessageType type, Agent sender)
content
- the contenttype
- the typesender
- the senderpublic java.lang.Object getContent()
public void setContent(java.lang.Object content)
content
- the new contentpublic MessageType getType()
public void setType(MessageType type)
type
- the new typepublic Agent getSender()
public void setSender(Agent sender)
sender
- the new sender