Class PartialStringMessageSink
java.lang.Object
org.eclipse.jetty.websocket.core.messages.AbstractMessageSink
org.eclipse.jetty.websocket.core.messages.PartialStringMessageSink
- All Implemented Interfaces:
MessageSink
A MessageSink implementation that delivers TEXT frames
to the application function passed to the constructor in the form
of a String.
-
Constructor Summary
ConstructorsConstructorDescriptionPartialStringMessageSink(CoreSession session, MethodHandle methodHandle, boolean autoDemand) Creates a newPartialStringMessageSink. -
Method Summary
Methods inherited from class AbstractMessageSink
autoDemand, getCoreSession, getMethodHandle, isAutoDemand
-
Constructor Details
-
PartialStringMessageSink
Creates a newPartialStringMessageSink.- Parameters:
session- the WebSocket sessionmethodHandle- the application function to invoke when a new frame has arrivedautoDemand- whether thisMessageSinkmanages demand automatically
-
-
Method Details
-
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().- Parameters:
frame- the frame to consumecallback- the callback to complete when the frame is consumed
-
fail
Description copied from interface:MessageSinkFails this
MessageSinkwith the given cause.- Parameters:
failure- the cause of the failure
-