org.gudy.azureus2.pluginsimpl.local.network
Class OutgoingMessageQueueImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.network.OutgoingMessageQueueImpl
All Implemented Interfaces:
OutgoingMessageQueue

public class OutgoingMessageQueueImpl
extends Object
implements OutgoingMessageQueue


Constructor Summary
protected OutgoingMessageQueueImpl(OutgoingMessageQueue core_queue)
           
 
Method Summary
 void deregisterListener(OutgoingMessageQueueListener listener)
          Remove registration of queue listener.
 int getDataQueuedBytes()
           
 int getPercentDoneOfCurrentMessage()
           
 int getProtocolQueuedBytes()
           
 boolean isBlocked()
           
 void notifyOfExternalSend(Message message)
          Notifty the queue (and its listeners) of a message sent externally on the queue's behalf.
 void registerListener(OutgoingMessageQueueListener listener)
          Register queue listener.
 void sendMessage(Message message)
          Queue the given message for sending.
 void setEncoder(MessageStreamEncoder encoder)
          Set the message stream encoder that will be used to encode outgoing messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutgoingMessageQueueImpl

protected OutgoingMessageQueueImpl(OutgoingMessageQueue core_queue)
Method Detail

setEncoder

public void setEncoder(MessageStreamEncoder encoder)
Description copied from interface: OutgoingMessageQueue
Set the message stream encoder that will be used to encode outgoing messages.

Specified by:
setEncoder in interface OutgoingMessageQueue
Parameters:
encoder - to use

sendMessage

public void sendMessage(Message message)
Description copied from interface: OutgoingMessageQueue
Queue the given message for sending.

Specified by:
sendMessage in interface OutgoingMessageQueue
Parameters:
message - to send

registerListener

public void registerListener(OutgoingMessageQueueListener listener)
Description copied from interface: OutgoingMessageQueue
Register queue listener.

Specified by:
registerListener in interface OutgoingMessageQueue
Parameters:
listener - to register

deregisterListener

public void deregisterListener(OutgoingMessageQueueListener listener)
Description copied from interface: OutgoingMessageQueue
Remove registration of queue listener.

Specified by:
deregisterListener in interface OutgoingMessageQueue
Parameters:
listener - to remove

notifyOfExternalSend

public void notifyOfExternalSend(Message message)
Description copied from interface: OutgoingMessageQueue
Notifty the queue (and its listeners) of a message sent externally on the queue's behalf.

Specified by:
notifyOfExternalSend in interface OutgoingMessageQueue
Parameters:
message - sent externally

getPercentDoneOfCurrentMessage

public int getPercentDoneOfCurrentMessage()
Specified by:
getPercentDoneOfCurrentMessage in interface OutgoingMessageQueue

getDataQueuedBytes

public int getDataQueuedBytes()
Specified by:
getDataQueuedBytes in interface OutgoingMessageQueue

getProtocolQueuedBytes

public int getProtocolQueuedBytes()
Specified by:
getProtocolQueuedBytes in interface OutgoingMessageQueue

isBlocked

public boolean isBlocked()
Specified by:
isBlocked in interface OutgoingMessageQueue