Methods Summary |
---|
public void | addMessage(Message message, boolean manual_listener_notify)Add a message to the message queue.
NOTE: Allows for manual listener notification at some later time,
using doListenerNotifications(), instead of notifying immediately
from within this method. This is useful if you want to invoke
listeners outside of some greater synchronised block to avoid
deadlock.
|
public void | cancelQueueListener(com.aelitis.azureus.core.networkmanager.OutgoingMessageQueue$MessageQueueListener listener)Cancel queue event notification listener.
|
public int | deliverToTransport(int max_bytes, boolean manual_listener_notify)Deliver (write) message(s) data to the underlying transport.
NOTE: Allows for manual listener notification at some later time,
using doListenerNotifications(), instead of notifying immediately
from within this method. This is useful if you want to invoke
listeners outside of some greater synchronised block to avoid
deadlock.
|
public void | destroy()Destroy this queue; i.e. perform cleanup actions.
|
public void | doListenerNotifications()Manually send any unsent listener notifications.
|
public MessageStreamEncoder | getEncoder()
|
public int | getMssSize()
|
public int | getPercentDoneOfCurrentMessage()Get the percentage of the current message that has already been sent out.
|
public java.lang.String | getQueueTrace()
|
public int | getTotalSize()Get the total number of bytes ready to be transported.
|
public boolean | hasUrgentMessage()Whether or not an urgent message (one that needs an immediate send, i.e. a no-delay message) is queued.
|
public boolean | isDestroyed()
|
public void | notifyOfExternallySentMessage(Message message)Notifty the queue (and its listeners) of a message sent externally on the queue's behalf.
|
public void | registerQueueListener(com.aelitis.azureus.core.networkmanager.OutgoingMessageQueue$MessageQueueListener listener)Add a listener to be notified of queue events.
|
public boolean | removeMessage(Message message, boolean manual_listener_notify)Remove a particular message from the queue.
NOTE: Only the original message found in the queue will be destroyed upon removal,
which may not necessarily be the one passed as the method parameter,
as some messages override equals() (i.e. BTRequest messages) instead of using reference
equality, and could be a completely different object, and would need to be destroyed
manually. If the message does not override equals, then any such method will likely
*not* be found and removed, as internal queued object was a new allocation on insertion.
NOTE: Allows for manual listener notification at some later time,
using doListenerNotifications(), instead of notifying immediately
from within this method. This is useful if you want to invoke
listeners outside of some greater synchronised block to avoid
deadlock.
|
public void | removeMessagesOfType(Message[] message_types, boolean manual_listener_notify)Remove all messages of the given types from the queue.
NOTE: Allows for manual listener notification at some later time,
using doListenerNotifications(), instead of notifying immediately
from within this method. This is useful if you want to invoke
listeners outside of some greater synchronised block to avoid
deadlock.
|
public void | setEncoder(MessageStreamEncoder stream_encoder)Set the message stream encoder that will be used to encode outgoing messages.
|
public void | setTrace(boolean on)
|
public void | setTransport(Transport _transport)
|