public class MessageRelayEvent extends MessageEvent
| Modifier and Type | Field and Description |
|---|---|
static int |
ABORTED
Message relay stage constant for aborted delivery
|
static int |
SENDING
Message relay stage constant for start of sending
|
static java.lang.String[] |
STAGE_STRINGS
Stage constant -> String representation mapping
|
static int |
TRANSFERRED
Message relay stage constant for ready delivery
|
fromAddr, id, toAddrtime| Constructor and Description |
|---|
MessageRelayEvent(int from,
int to,
java.lang.String id,
double time,
int stage)
Creates a message relaying event
|
| Modifier and Type | Method and Description |
|---|---|
void |
processEvent(World world)
Relays the message
|
java.lang.String |
toString()
Returns a String representation of the event
|
compareTo, getTimepublic static final int SENDING
public static final int TRANSFERRED
public static final int ABORTED
public static final java.lang.String[] STAGE_STRINGS
public MessageRelayEvent(int from,
int to,
java.lang.String id,
double time,
int stage)
from - Where the message comes from (at this hop)to - Who the message goes to (at this hop)id - ID of the messagetime - Time when this event happensstage - The stage of the event (SENDING, TRANSFERRED, or ABORTED)public void processEvent(World world)
processEvent in class ExternalEventworld - World where the actors of the event arepublic java.lang.String toString()
ExternalEventtoString in class MessageEvent