Top Description Methods
io.undertow.server.protocol.framed

public Interface FramePriority<C extends AbstractFramedChannel<C, R, S>, R extends AbstractFramedStreamSourceChannel<C, R, S>, S extends AbstractFramedStreamSinkChannel<C, R, S>>

Known Direct Implementers
io.undertow.websockets.core.WebSocketFramePriority, io.undertow.protocols.ajp.AjpClientFramePriority, io.undertow.protocols.http2.Http2FramePriority
Imports
java.util.Deque, .List

Interface that can be used to determine where to insert a given frame into the pending frame queue.
Author
Stuart Douglas

Method Summary

Modifier and TypeMethod and Description
public void
frameAdded(S
The newly added frame
addedFrame
,
final List<S>
The pending frame queue
pendingFrames
,
final Deque<S>
The held frame queue
holdFrames
)

Invoked when a new frame is successfully added to the pending frames queue.

public boolean

Returns:

true if the frame can be inserted into the pending frame list
insertFrame
(S
The new frame to insert into the pending frame list
newFrame
,
final List<S>
The pending frame list
pendingFrames
)

Inserts the new frame at the correct location in the pending frame list.

Method Detail

frameAddedback to summary
public void frameAdded(S addedFrame, final List<S> pendingFrames, final Deque<S> holdFrames)

Invoked when a new frame is successfully added to the pending frames queue. If frames in the held frame queue are now eligible to be sent they can be added to the pending frames queue. Note that if the protocol has explicitly asked for the held frames to be recalculated then the added frame may be null.

Parameters
addedFrame:S

The newly added frame

pendingFrames:List<S>

The pending frame queue

holdFrames:Deque<S>

The held frame queue

insertFrameback to summary
public boolean insertFrame(S newFrame, final List<S> pendingFrames)

Inserts the new frame at the correct location in the pending frame list. Note that this must never insert a frame at the very start of the senders list, as this frame has already been activated. This method should return true if the frame was successfully inserted into the pending frame list, if it returns false the frame must not be inserted and will be added to the held frames list instead. Frames held in the held frames list are frames that are not yet ready to be included in the pending frame list, generally because other frames have to be written first. Note that if this method returns true without adding the frame the frame will be dropped.

Parameters
newFrame:S

The new frame to insert into the pending frame list

pendingFrames:List<S>

The pending frame list

Returns:boolean

true if the frame can be inserted into the pending frame list