FileDocCategorySizeDatePackage
IncomingMessageQueue.javaAPI DocAzureus 3.0.3.43495Thu Jan 11 07:45:32 GMT 2007com.aelitis.azureus.core.networkmanager

IncomingMessageQueue

public interface IncomingMessageQueue
Inbound peer message queue.

Fields Summary
Constructors Summary
Methods Summary
public voidcancelQueueListener(com.aelitis.azureus.core.networkmanager.IncomingMessageQueue$MessageQueueListener listener)
Cancel queue event notification listener.

param
listener

public voiddestroy()
Destroy this queue.

public MessageStreamDecodergetDecoder()

public intgetPercentDoneOfCurrentMessage()
Get the percentage of the current message that has already been received.

return
percentage complete (0-99), or -1 if no message is currently being received

public voidnotifyOfExternallyReceivedMessage(Message message)
Notifty the queue (and its listeners) of a message received externally on the queue's behalf.

param
message received externally

public intreceiveFromTransport(int max_bytes)
Receive (read) message(s) data from the underlying transport.

param
max_bytes to read
return
number of bytes received
throws
IOException on receive error

public voidregisterQueueListener(com.aelitis.azureus.core.networkmanager.IncomingMessageQueue$MessageQueueListener listener)
Add a listener to be notified of queue events.

param
listener

public voidresumeQueueProcessing()
Manually resume processing (reading) incoming messages. NOTE: Allows us to resume docoding externally, in case it was auto-paused internally.

public voidsetDecoder(MessageStreamDecoder new_stream_decoder)
Set the message stream decoder that will be used to decode incoming messages.

param
new_stream_decoder to use