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
public class PerMessageDeflateExtension extends CompressExtension
Per Message Deflate Compression extension for WebSocket.Attempts to follow Compression Extensions for WebSocket
-
-
Field Summary
Fields Modifier and Type Field Description private ExtensionConfig
configNegotiated
private ExtensionConfig
configRequested
private boolean
incomingCompressed
private boolean
incomingContextTakeover
private static org.eclipse.jetty.util.log.Logger
LOG
private boolean
outgoingContextTakeover
-
Fields inherited from class org.eclipse.jetty.websocket.common.extensions.compress.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_NEVER
-
-
Constructor Summary
Constructors Constructor Description PerMessageDeflateExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
TheSec-WebSocket-Extensions
name for this extension.(package private) int
getRsvUseMode()
Return the mode of operation for RSV flag use in frames generate by compress (outgoing)(package private) int
getTailDropMode()
Return the mode of operation for dropping (or keeping) tail bytes in frames generated by compress (outgoing)void
incomingFrame(Frame frame)
Process the incoming frame.protected void
nextIncomingFrame(Frame frame)
protected void
nextOutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
void
setConfig(ExtensionConfig config)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension
decompress, doStop, endsWithTail, forwardIncoming, getDeflater, getInflater, isRsv1User, newByteAccumulator, notifyCallbackFailure, notifyCallbackSuccess, outgoingFrame, setDeflaterPool, setInflaterPool
-
Methods inherited from class org.eclipse.jetty.websocket.common.extensions.AbstractExtension
getBufferPool, getConfig, getConnection, getNextIncoming, getNextOutgoing, getPolicy, init, init, isRsv2User, isRsv3User, setBufferPool, setConnection, setNextIncomingFrames, setNextOutgoingFrames, setPolicy
-
-
-
-
Field Detail
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG
-
configRequested
private ExtensionConfig configRequested
-
configNegotiated
private ExtensionConfig configNegotiated
-
incomingContextTakeover
private boolean incomingContextTakeover
-
outgoingContextTakeover
private boolean outgoingContextTakeover
-
incomingCompressed
private boolean incomingCompressed
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Extension
TheSec-WebSocket-Extensions
name for this extension.Also known as the
extension-token
per Section 9.1. Negotiating Extensions.- Specified by:
getName
in interfaceExtension
- Overrides:
getName
in classAbstractExtension
- Returns:
- the name of the extension
-
incomingFrame
public void incomingFrame(Frame frame)
Description copied from interface:IncomingFrames
Process 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
protected void nextIncomingFrame(Frame frame)
- Overrides:
nextIncomingFrame
in classAbstractExtension
-
nextOutgoingFrame
protected void nextOutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
- Overrides:
nextOutgoingFrame
in classAbstractExtension
-
getRsvUseMode
int getRsvUseMode()
Description copied from class:CompressExtension
Return the mode of operation for RSV flag use in frames generate by compress (outgoing)- Specified by:
getRsvUseMode
in classCompressExtension
- Returns:
- either
CompressExtension.RSV_USE_ALWAYS
orCompressExtension.RSV_USE_ONLY_FIRST
-
getTailDropMode
int getTailDropMode()
Description copied from class:CompressExtension
Return the mode of operation for dropping (or keeping) tail bytes in frames generated by compress (outgoing)- Specified by:
getTailDropMode
in classCompressExtension
- Returns:
- either
CompressExtension.TAIL_DROP_ALWAYS
,CompressExtension.TAIL_DROP_FIN_ONLY
, orCompressExtension.TAIL_DROP_NEVER
-
setConfig
public void setConfig(ExtensionConfig config)
- Overrides:
setConfig
in classAbstractExtension
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCompressExtension
-
-