Class MessageReader
java.lang.Object
java.io.Reader
org.eclipse.jetty.websocket.core.messages.MessageReader
- All Implemented Interfaces:
 Closeable, AutoCloseable, Readable, MessageSink
Support class for reading a (single) WebSocket TEXT message via a Reader.
In compliance to the WebSocket spec, this reader always uses the StandardCharsets.UTF_8.
- 
Field Summary
 - 
Constructor Summary
Constructors - 
Method Summary
Methods inherited from class Reader
mark, markSupported, nullReader, of, read, read, read, readAllAsString, readAllLines, ready, reset, skip, transferTo 
- 
Constructor Details
- 
MessageReader
 
 - 
 - 
Method Details
- 
read
- Specified by:
 readin classReader- Throws:
 IOException
 - 
fail
Description copied from interface:MessageSinkFails this
MessageSinkwith the given cause.- Specified by:
 failin interfaceMessageSink- Parameters:
 failure- the cause of the failure
 - 
close
- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Specified by:
 closein classReader- Throws:
 IOException
 - 
accept
Description copied from interface:MessageSinkConsumes 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().- Specified by:
 acceptin interfaceMessageSink- Parameters:
 frame- the frame to consumecallback- the callback to complete when the frame is consumed
 
 -