java.util.EventListener, org.xnio.ChannelListener<WebSocketChannel>public abstract class AbstractReceiveListener extends java.lang.Object implements org.xnio.ChannelListener<WebSocketChannel>
| Constructor | Description |
|---|---|
AbstractReceiveListener() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
bufferFullMessage(StreamSourceFrameChannel messageChannel) |
Utility method that reads a full text or binary message, including all fragmented parts.
|
protected long |
getMaxBinaryBufferSize() |
|
protected long |
getMaxCloseBufferSize() |
|
protected long |
getMaxPingBufferSize() |
|
protected long |
getMaxPongBufferSize() |
|
protected long |
getMaxTextBufferSize() |
|
void |
handleEvent(WebSocketChannel channel) |
|
protected void |
onBinary(WebSocketChannel webSocketChannel,
StreamSourceFrameChannel messageChannel) |
|
protected void |
onClose(WebSocketChannel webSocketChannel,
StreamSourceFrameChannel channel) |
|
protected void |
onCloseMessage(CloseMessage cm,
WebSocketChannel channel) |
|
protected void |
onError(WebSocketChannel channel,
java.lang.Throwable error) |
|
protected void |
onFullBinaryMessage(WebSocketChannel channel,
BufferedBinaryMessage message) |
|
protected void |
onFullCloseMessage(WebSocketChannel channel,
BufferedBinaryMessage message) |
|
protected void |
onFullPingMessage(WebSocketChannel channel,
BufferedBinaryMessage message) |
|
protected void |
onFullPongMessage(WebSocketChannel channel,
BufferedBinaryMessage message) |
|
protected void |
onFullTextMessage(WebSocketChannel channel,
BufferedTextMessage message) |
|
protected void |
onPing(WebSocketChannel webSocketChannel,
StreamSourceFrameChannel channel) |
|
protected void |
onPong(WebSocketChannel webSocketChannel,
StreamSourceFrameChannel messageChannel) |
|
protected void |
onText(WebSocketChannel webSocketChannel,
StreamSourceFrameChannel messageChannel) |
public void handleEvent(WebSocketChannel channel)
handleEvent in interface org.xnio.ChannelListener<WebSocketChannel>protected void onPing(WebSocketChannel webSocketChannel, StreamSourceFrameChannel channel) throws java.io.IOException
java.io.IOExceptionprotected void onClose(WebSocketChannel webSocketChannel, StreamSourceFrameChannel channel) throws java.io.IOException
java.io.IOExceptionprotected void onPong(WebSocketChannel webSocketChannel, StreamSourceFrameChannel messageChannel) throws java.io.IOException
java.io.IOExceptionprotected void onText(WebSocketChannel webSocketChannel, StreamSourceFrameChannel messageChannel) throws java.io.IOException
java.io.IOExceptionprotected void onBinary(WebSocketChannel webSocketChannel, StreamSourceFrameChannel messageChannel) throws java.io.IOException
java.io.IOExceptionprotected void onError(WebSocketChannel channel, java.lang.Throwable error)
protected final void bufferFullMessage(StreamSourceFrameChannel messageChannel)
onFullTextMessage(WebSocketChannel, BufferedTextMessage) or
onFullBinaryMessage(WebSocketChannel, BufferedBinaryMessage) method will be invoked.messageChannel - The message channelprotected long getMaxBinaryBufferSize()
protected long getMaxPongBufferSize()
protected long getMaxCloseBufferSize()
protected long getMaxPingBufferSize()
protected long getMaxTextBufferSize()
protected void onFullTextMessage(WebSocketChannel channel, BufferedTextMessage message) throws java.io.IOException
java.io.IOExceptionprotected void onFullBinaryMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws java.io.IOException
java.io.IOExceptionprotected void onFullPingMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws java.io.IOException
java.io.IOExceptionprotected void onFullPongMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws java.io.IOException
java.io.IOExceptionprotected void onFullCloseMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws java.io.IOException
java.io.IOExceptionprotected void onCloseMessage(CloseMessage cm, WebSocketChannel channel)
Copyright © 2018. All rights reserved.