A MessageSink implementation that accumulates TEXT frames
into a message that is then delivered to the application function
passed to the constructor in the form of a String.
| Modifier and Type | Field and Description |
|---|---|
| private Utf8StringBuilder | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | StringMessageSink(CoreSession
the WebSocket session session, MethodHandle the application function to invoke when a new message has been assembled methodHandle, boolean whether this autoDemand)MessageSink manages demand automaticallyCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Frame
the frame to consume frame, Callback the callback to complete when the frame is consumed callback)Implements org. Consumes the WebSocket frame, possibly asynchronously when this method has returned. |
| public void | fail(Throwable
the cause of the failure failure)Overrides default org. Fails this |
| private void |
| StringMessageSink | back to summary |
|---|---|
| public StringMessageSink(CoreSession session, MethodHandle methodHandle, boolean autoDemand) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(Frame frame, Callback callback) Implements org. Doc from org. 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 | |
| fail | back to summary |
|---|---|
| public void fail(Throwable failure) Overrides default org. Doc from org. Fails this | |
| reset | back to summary |
|---|---|
| private void reset() | |