public class BlaubotMessageReceiver
extends java.lang.Object
Constructor and Description |
---|
BlaubotMessageReceiver(IBlaubotConnection blaubotConnection) |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates the message receiver (reading from the connection).
|
void |
addMessageListener(IBlaubotMessageListener messageListener) |
void |
deactivate(IActionListener actionListener)
Deactivates the message receiver (completes current message readings, if any and then shuts down)
|
boolean |
equals(java.lang.Object o) |
IBlaubotConnection |
getBlaubotConnection()
The blaubot connection used to receive messages.
|
long |
getReceivedChunkMessages() |
long |
getReceivedMessages() |
long |
getReceivedPayloadBytes() |
int |
hashCode() |
void |
removeMessageListener(IBlaubotMessageListener messageListener) |
void |
setForwardChunks(boolean forwardChunks)
If set to true, the receiver will not collect chunks and dispatch the whole (pieced together)
message to the listeners, but simply forward the chunks to the listeners.
|
java.lang.String |
toString() |
public BlaubotMessageReceiver(IBlaubotConnection blaubotConnection)
public void addMessageListener(IBlaubotMessageListener messageListener)
public void removeMessageListener(IBlaubotMessageListener messageListener)
public IBlaubotConnection getBlaubotConnection()
public void activate()
public void deactivate(IActionListener actionListener)
actionListener
- callback to be informed when the receiver was closed (thread finished), can be nullpublic long getReceivedMessages()
public long getReceivedPayloadBytes()
public void setForwardChunks(boolean forwardChunks)
forwardChunks
- iff true, chunk forwarding is activepublic long getReceivedChunkMessages()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object