public class Telegram extends Object implements Comparable<Telegram>, Poolable
MessageDispatcher manages telegram life-cycle.| Modifier and Type | Field and Description |
|---|---|
Object |
extraInfo
Any additional information that may accompany the message
|
int |
message
The message type.
|
Telegraph |
receiver
The agent that is to receive this telegram
|
static int |
RETURN_RECEIPT_NEEDED
Indicates that the sender needs the return receipt
|
static int |
RETURN_RECEIPT_SENT
Indicates that the return receipt has been sent back to the original sender of the telegram
|
static int |
RETURN_RECEIPT_UNNEEDED
Indicates that the sender doesn't need any return receipt
|
int |
returnReceiptStatus
The return receipt status of this telegram.
|
Telegraph |
sender
The agent that sent this telegram
|
| Constructor and Description |
|---|
Telegram()
Creates an empty
Telegram. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Telegram other) |
boolean |
equals(Object obj) |
float |
getTimestamp()
Returns the time stamp of this telegram.
|
int |
hashCode() |
void |
reset()
Resets the object for reuse.
|
void |
setTimestamp(float timestamp)
Sets the time stamp of this telegram.
|
public static final int RETURN_RECEIPT_UNNEEDED
public static final int RETURN_RECEIPT_NEEDED
public static final int RETURN_RECEIPT_SENT
public Telegraph sender
public Telegraph receiver
public int message
public int returnReceiptStatus
RETURN_RECEIPT_UNNEEDED, RETURN_RECEIPT_NEEDED or
RETURN_RECEIPT_SENT.public Object extraInfo
public float getTimestamp()
public void setTimestamp(float timestamp)
public void reset()
Poolablepublic int compareTo(Telegram other)
compareTo in interface Comparable<Telegram>Copyright © 2017. All rights reserved.