public class MessageItem
extends java.lang.Object
Constructor and Description |
---|
MessageItem(byte[] data,
AsyncMessageCallback[] cb2,
boolean formatted,
ByteCounter ctr,
short priority,
boolean sendLoadRT,
boolean sendLoadBulk) |
MessageItem(Message msg2,
AsyncMessageCallback[] cb2,
ByteCounter ctr) |
MessageItem(Message msg2,
AsyncMessageCallback[] cb2,
ByteCounter ctr,
short overridePriority) |
Modifier and Type | Method and Description |
---|---|
void |
clearDeadline()
Clear the deadline for this message.
|
byte[] |
getData()
Return the data contents of this MessageItem.
|
long |
getDeadline()
Get the deadline for this message.
|
long |
getID() |
int |
getLength() |
short |
getPriority() |
void |
onDisconnect() |
void |
onFailed() |
void |
onSent(int length) |
void |
onSentAll()
Called the first time we have sent all of the message.
|
void |
setDeadline(long time)
Set the deadline for this message.
|
java.lang.String |
toString() |
public MessageItem(Message msg2, AsyncMessageCallback[] cb2, ByteCounter ctr, short overridePriority)
public MessageItem(Message msg2, AsyncMessageCallback[] cb2, ByteCounter ctr)
public MessageItem(byte[] data, AsyncMessageCallback[] cb2, boolean formatted, ByteCounter ctr, short priority, boolean sendLoadRT, boolean sendLoadBulk)
public byte[] getData()
public int getLength()
public void onSent(int length)
length
- The actual number of bytes sent to send this message, including our share of the packet overheads,
*and including alreadyReportedBytes*, which is only used when deciding how many bytes to report to the throttle.public short getPriority()
public java.lang.String toString()
toString
in class java.lang.Object
public void onDisconnect()
public void onFailed()
public long getID()
public void onSentAll()
public void setDeadline(long time)
time
- The time (in the future) to set the deadline to.public void clearDeadline()
public long getDeadline()