Class FragmentExtension
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.extensions.AbstractExtension
org.eclipse.jetty.websocket.common.extensions.fragment.FragmentExtension
- All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle, Extension, IncomingFrames, OutgoingFrames
Fragment Extension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static classNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Queue<FragmentExtension.FrameEntry> private final org.eclipse.jetty.util.IteratingCallbackprivate static final org.eclipse.jetty.util.log.Loggerprivate intFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()TheSec-WebSocket-Extensionsname for this extension.voidincomingFrame(Frame frame) Process the incoming frame.private voidvoidoutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode) A frame, and optional callback, intended for the network layer.private FragmentExtension.FrameEntryvoidsetConfig(ExtensionConfig config) Methods inherited from class AbstractExtension
getBufferPool, getConfig, getConnection, getNextIncoming, getNextOutgoing, getPolicy, init, init, isRsv1User, isRsv2User, isRsv3User, nextIncomingFrame, nextOutgoingFrame, setBufferPool, setConnection, setNextIncomingFrames, setNextOutgoingFrames, setPolicy, toStringMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStart, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
Field Details
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG -
entries
-
flusher
private final org.eclipse.jetty.util.IteratingCallback flusher -
maxLength
private int maxLength
-
-
Constructor Details
-
FragmentExtension
public FragmentExtension()
-
-
Method Details
-
getName
Description copied from interface:ExtensionTheSec-WebSocket-Extensionsname for this extension.Also known as the
extension-tokenper Section 9.1. Negotiating Extensions.- Specified by:
getNamein interfaceExtension- Overrides:
getNamein classAbstractExtension- Returns:
- the name of the extension
-
incomingFrame
Description copied from interface:IncomingFramesProcess the incoming frame.Note: if you need to hang onto any information from the frame, be sure to copy it, as the information contained in the Frame will be released and/or reused by the implementation.
- Parameters:
frame- the frame to process
-
outgoingFrame
Description copied from interface:OutgoingFramesA frame, and optional callback, intended for the network layer.Note: the frame can undergo many transformations in the various layers and extensions present in the implementation.
If you are implementing a mutation, you are obliged to handle the incoming WriteCallback appropriately.
- Parameters:
frame- the frame to eventually write to the network layer.callback- the callback to notify when the frame is written.batchMode- the batch mode requested by the sender.
-
setConfig
- Overrides:
setConfigin classAbstractExtension
-
offerEntry
-
pollEntry
-