Class PartialByteBufferMessageSink
java.lang.Object
org.eclipse.jetty.websocket.core.messages.AbstractMessageSink
org.eclipse.jetty.websocket.core.messages.PartialByteBufferMessageSink
- All Implemented Interfaces:
 MessageSink
A MessageSink implementation that delivers BINARY frames
to the application function passed to the constructor in the form
of a ByteBuffer.
- 
Constructor Summary
ConstructorsConstructorDescriptionPartialByteBufferMessageSink(CoreSession session, MethodHolder methodHolder, boolean autoDemand) Creates a newPartialByteBufferMessageSink. - 
Method Summary
Modifier and TypeMethodDescriptionvoidConsumes the WebSocket frame, possibly asynchronously when this method has returned.protected voidinvoke(MethodHolder methodHolder, ByteBuffer byteBuffer, boolean fin, Callback callback) Methods inherited from class AbstractMessageSink
autoDemand, getCoreSession, getMethodHolder, isAutoDemandMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MessageSink
fail 
- 
Constructor Details
- 
PartialByteBufferMessageSink
public PartialByteBufferMessageSink(CoreSession session, MethodHolder methodHolder, boolean autoDemand) Creates a newPartialByteBufferMessageSink.- Parameters:
 session- the WebSocket sessionmethodHolder- 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
 - 
invoke
protected void invoke(MethodHolder methodHolder, ByteBuffer byteBuffer, boolean fin, Callback callback) throws Throwable - Throws:
 Throwable
 
 -