Top Description Fields Constructors Methods
org.eclipse.jetty.websocket.core.util

public abstract Class FragmentingFlusher

extends TransformingFlusher
Class Inheritance
Known Direct Subclasses
org.eclipse.jetty.websocket.core.WebSocketCoreSession.Flusher
Imports
java.nio.ByteBuffer, org.eclipse.jetty.util.Callback, org.eclipse.jetty.websocket.core.Configuration, .Frame, .OpCode, org.eclipse.jetty.websocket.core.internal.FrameEntry, org.slf4j.Logger, .LoggerFactory

Used to split large data frames into multiple frames below the maxFrameSize. Control frames and dataFrames smaller than the maxFrameSize will be forwarded directly to forwardFrame(Frame, Callback, boolean).

Field Summary

Modifier and TypeField and Description
private final Configuration
private FrameEntry
private static final Logger
private ByteBuffer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract void
forwardFrame(Frame frame, Callback callback, boolean batch)

private boolean
fragment(Callback callback, boolean first)

protected boolean
onFrame(Frame
the frame to transform.
frame
,
Callback
used to signal to start processing again.
callback
,
boolean
whether this frame can be batched.
batch
)

Implements abstract org.eclipse.jetty.websocket.core.util.TransformingFlusher.onFrame.

Called when a frame is ready to be transformed.

protected boolean
transform(Callback
used to signal to start processing again.
callback
)

Implements abstract org.eclipse.jetty.websocket.core.util.TransformingFlusher.transform.

Called to transform the frame given in TransformingFlusher#onFrame(Frame, Callback, boolean).

Inherited from org.eclipse.jetty.websocket.core.util.TransformingFlusher:
closeFlusherfailFlushersendFrame

Field Detail

configurationback to summary
private final Configuration configuration
currentback to summary
private FrameEntry current
LOGback to summary
private static final Logger LOG
payloadback to summary
private ByteBuffer payload

Constructor Detail

FragmentingFlusherback to summary
public FragmentingFlusher(Configuration configuration)

Method Detail

forwardFrameback to summary
protected abstract void forwardFrame(Frame frame, Callback callback, boolean batch)
fragmentback to summary
private boolean fragment(Callback callback, boolean first)
onFrameback to summary
protected boolean onFrame(Frame frame, Callback callback, boolean batch)

Implements abstract org.eclipse.jetty.websocket.core.util.TransformingFlusher.onFrame.

Doc from org.eclipse.jetty.websocket.core.util.TransformingFlusher.onFrame.

Called when a frame is ready to be transformed.

Parameters
frame:Frame

the frame to transform.

callback:Callback

used to signal to start processing again.

batch:boolean

whether this frame can be batched.

Returns:boolean

true to indicate that you have finished transforming this frame.

Annotations
@Override
transformback to summary
protected boolean transform(Callback callback)

Implements abstract org.eclipse.jetty.websocket.core.util.TransformingFlusher.transform.

Doc from org.eclipse.jetty.websocket.core.util.TransformingFlusher.transform.

Called to transform the frame given in TransformingFlusher#onFrame(Frame, Callback, boolean). This method is called on each callback success until it returns true. If the call to onFrame(Frame, Callback, boolean) returns true then this method will not be called.

Parameters
callback:Callback

used to signal to start processing again.

Returns:boolean

true to indicate that you have finished transforming this frame.

Annotations
@Override