Class PerMessageDeflateExtension
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.extensions.AbstractExtension
org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension
org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension
- All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle, Extension, IncomingFrames, OutgoingFrames
Per Message Deflate Compression extension for WebSocket.
Attempts to follow Compression Extensions for WebSocket
-
Nested Class Summary
Nested 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 ExtensionConfigprivate ExtensionConfigprivate booleanprivate booleanprivate static final org.eclipse.jetty.util.log.Loggerprivate booleanFields inherited from class CompressExtension
decompressCount, INFLATE_BUFFER_SIZE, INPUT_MAX_BUFFER_SIZE, RSV_USE_ALWAYS, RSV_USE_ONLY_FIRST, TAIL_BYTES, TAIL_BYTES_BUF, TAIL_DROP_ALWAYS, TAIL_DROP_FIN_ONLY, TAIL_DROP_NEVERFields 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.(package private) intReturn the mode of operation for RSV flag use in frames generate by compress (outgoing)(package private) intReturn the mode of operation for dropping (or keeping) tail bytes in frames generated by compress (outgoing)voidincomingFrame(Frame frame) Process the incoming frame.protected voidnextIncomingFrame(Frame frame) protected voidnextOutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode) voidsetConfig(ExtensionConfig config) toString()Methods inherited from class CompressExtension
decompress, doStop, endsWithTail, forwardIncoming, getDeflater, getInflater, isRsv1User, newByteAccumulator, notifyCallbackFailure, notifyCallbackSuccess, outgoingFrame, setDeflaterPool, setInflaterPoolMethods inherited from class AbstractExtension
getBufferPool, getConfig, getConnection, getNextIncoming, getNextOutgoing, getPolicy, init, init, isRsv2User, isRsv3User, setBufferPool, setConnection, setNextIncomingFrames, setNextOutgoingFrames, setPolicyMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStart, 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 -
configRequested
-
configNegotiated
-
incomingContextTakeover
private boolean incomingContextTakeover -
outgoingContextTakeover
private boolean outgoingContextTakeover -
incomingCompressed
private boolean incomingCompressed
-
-
Constructor Details
-
PerMessageDeflateExtension
public PerMessageDeflateExtension()
-
-
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
-
nextIncomingFrame
- Overrides:
nextIncomingFramein classAbstractExtension
-
nextOutgoingFrame
- Overrides:
nextOutgoingFramein classAbstractExtension
-
getRsvUseMode
int getRsvUseMode()Description copied from class:CompressExtensionReturn the mode of operation for RSV flag use in frames generate by compress (outgoing)- Specified by:
getRsvUseModein classCompressExtension- Returns:
- either
CompressExtension.RSV_USE_ALWAYSorCompressExtension.RSV_USE_ONLY_FIRST
-
getTailDropMode
int getTailDropMode()Description copied from class:CompressExtensionReturn the mode of operation for dropping (or keeping) tail bytes in frames generated by compress (outgoing)- Specified by:
getTailDropModein classCompressExtension- Returns:
- either
CompressExtension.TAIL_DROP_ALWAYS,CompressExtension.TAIL_DROP_FIN_ONLY, orCompressExtension.TAIL_DROP_NEVER
-
setConfig
- Overrides:
setConfigin classAbstractExtension
-
toString
- Overrides:
toStringin classCompressExtension
-