public abstract class AbstractReceiveListener extends Object implements ChannelListener<WebSocketChannel>
ChannelListener.Setter<T extends Channel>, ChannelListener.SimpleSetter<T extends Channel>
Constructor and Description |
---|
AbstractReceiveListener() |
Modifier and Type | Method and 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)
Handle the event on this 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,
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)
ChannelListener
handleEvent
in interface ChannelListener<WebSocketChannel>
channel
- the channel eventprotected void onPing(WebSocketChannel webSocketChannel, StreamSourceFrameChannel channel) throws IOException
IOException
protected void onClose(WebSocketChannel webSocketChannel, StreamSourceFrameChannel channel) throws IOException
IOException
protected void onPong(WebSocketChannel webSocketChannel, StreamSourceFrameChannel messageChannel) throws IOException
IOException
protected void onText(WebSocketChannel webSocketChannel, StreamSourceFrameChannel messageChannel) throws IOException
IOException
protected void onBinary(WebSocketChannel webSocketChannel, StreamSourceFrameChannel messageChannel) throws IOException
IOException
protected void onError(WebSocketChannel channel, 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 IOException
IOException
protected void onFullBinaryMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws IOException
IOException
protected void onFullPingMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws IOException
IOException
protected void onFullPongMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws IOException
IOException
protected void onFullCloseMessage(WebSocketChannel channel, BufferedBinaryMessage message) throws IOException
IOException
protected void onCloseMessage(CloseMessage cm, WebSocketChannel channel)
Copyright © 2021 JBoss by Red Hat. All rights reserved.