|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--transport.protocol.Message | +--transport.protocol.P2PMessage
This class represents a Multicast message. This message is sent by agents to the simulator, the simulator then sends the message to all agents that are with within range and certain number of hops. It is for when agents want to send messages to each other.
Field Summary | |
private java.lang.Object |
content
Content to send in this message. |
private int |
hops
The maximum number hops the message can make. |
Fields inherited from class transport.protocol.Message |
|
Constructor Summary | |
P2PMessage(int from)
This constructor initializes the Message. |
|
P2PMessage(int from,
int hops)
This constructor initializes the Message. |
Method Summary | |
java.lang.Object |
getContent()
This method returns the object content of the message. |
int |
getHops()
This method returns the max number of hops for this message to take. |
void |
setContent(java.lang.Object c)
This method sets the object data to send in this message. |
Methods inherited from class transport.protocol.Message |
getFrom, getTo, setTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.Object content
private int hops
Constructor Detail |
public P2PMessage(int from)
from
- The port the message sender listens to.public P2PMessage(int from, int hops)
from
- The port the message sender listens to.hops
- The max number of hops.Method Detail |
public java.lang.Object getContent()
public void setContent(java.lang.Object c)
public int getHops()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |