Interface MessageSink
- All Known Implementing Classes:
AbstractDecodedMessageSink
,AbstractDecodedMessageSink.Basic
,AbstractDecodedMessageSink.Stream
,AbstractMessageSink
,ByteArrayMessageSink
,ByteBufferMessageSink
,ByteBufferMessageSink
,DecodedBinaryMessageSink
,DecodedBinaryStreamMessageSink
,DecodedTextMessageSink
,DecodedTextStreamMessageSink
,DispatchedMessageSink
,InputStreamMessageSink
,MessageInputStream
,MessageReader
,PartialByteArrayMessageSink
,PartialByteBufferMessageSink
,PartialByteBufferMessageSink
,PartialStringMessageSink
,ReaderMessageSink
,StringMessageSink
public interface MessageSink
A consumer of WebSocket data frames (either BINARY or TEXT).
FrameHandler
delegates the processing of data frames
to MessageSink
, including the processing of the demand
for the next frames.
-
Method Summary
-
Method Details
-
accept
Consumes the WebSocket frame, possibly asynchronously when this method has returned.
The callback argument must be completed when the frame payload is consumed.
The demand for more frames must be explicitly invoked, or arranged to be invoked asynchronously, by the implementation of this method, by calling
CoreSession.demand()
.- Parameters:
frame
- the frame to consumecallback
- the callback to complete when the frame is consumed
-
fail
Fails this
MessageSink
with the given cause.- Parameters:
failure
- the cause of the failure
-