java.lang.Object
io.helidon.websocket.WsListenerBase
- All Implemented Interfaces:
WsListener
A base class for WebSocket listeners to support readers and input streams.
IMPORTANT: use this class only for listeners that are registered as suppliers (i.e. you get a new instance for each web socket session), otherwise the thread guarantees will be broken and this will not work.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbinaryBufferData(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<BufferData, ?> bufferDataConsumer) protected voidbinaryByteArray(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<byte[], ?> byteArrayConsumer) protected voidbinaryByteBuffer(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<ByteBuffer, ?> streamConsumer) protected voidbinaryInputStream(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<InputStream, ?> streamConsumer) protected voidtextReader(WsSession session, String text, boolean last, Functions.CheckedConsumer<Reader, ?> readerConsumer) protected voidtextString(WsSession session, String text, boolean last, Functions.CheckedConsumer<String, ?> stringConsumer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.websocket.WsListener
onClose, onError, onHttpUpgrade, onMessage, onMessage, onOpen, onPing, onPong
-
Constructor Details
-
WsListenerBase
public WsListenerBase()
-
-
Method Details
-
textString
protected void textString(WsSession session, String text, boolean last, Functions.CheckedConsumer<String, ?> stringConsumer) -
textReader
protected void textReader(WsSession session, String text, boolean last, Functions.CheckedConsumer<Reader, ?> readerConsumer) -
binaryBufferData
protected void binaryBufferData(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<BufferData, ?> bufferDataConsumer) -
binaryByteBuffer
protected void binaryByteBuffer(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<ByteBuffer, ?> streamConsumer) -
binaryByteArray
protected void binaryByteArray(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<byte[], ?> byteArrayConsumer) -
binaryInputStream
protected void binaryInputStream(WsSession session, BufferData buffer, boolean last, Functions.CheckedConsumer<InputStream, ?> streamConsumer)
-