Interface OutgoingMessageQueue.MessageQueueListener
- Enclosing interface:
OutgoingMessageQueue
public static interface OutgoingMessageQueue.MessageQueueListener
Receive notification of queue events.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddataBytesSent(int byte_count) The given number of (piece) data bytes has been written to the transport.voidflush()booleanmessageAdded(Message message) The given message has just been added to the queue.voidmessageQueued(Message message) The given message has just been queued for sending out the transport.voidmessageRemoved(Message message) The given message has just been forcibly removed from the queue, i.e.voidmessageSent(Message message) The given message has been completely sent out through the transport.voidprotocolBytesSent(int byte_count) The given number of protocol (overhead) bytes has been written to the transport.
-
Method Details
-
messageAdded
The given message has just been added to the queue.- Parameters:
message- added for queuing- Returns:
- true if this message addition is allowed, false if it should be immediately removed without being queued or sent
-
messageQueued
The given message has just been queued for sending out the transport.- Parameters:
message- queued
-
messageRemoved
The given message has just been forcibly removed from the queue, i.e. it was *not* sent out the transport.- Parameters:
message- removed
-
messageSent
The given message has been completely sent out through the transport.- Parameters:
message- sent
-
protocolBytesSent
void protocolBytesSent(int byte_count) The given number of protocol (overhead) bytes has been written to the transport.- Parameters:
byte_count- number of protocol bytes
-
dataBytesSent
void dataBytesSent(int byte_count) The given number of (piece) data bytes has been written to the transport.- Parameters:
byte_count- number of data bytes
-
flush
void flush()
-