public class PerMessageDeflateExtension extends CompressExtension
Attempts to follow Compression Extensions for WebSocket
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
private ExtensionConfig |
configNegotiated |
private ExtensionConfig |
configRequested |
private boolean |
incomingCompressed |
private boolean |
incomingContextTakeover |
private static Logger |
LOG |
private boolean |
outgoingContextTakeover |
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 and Description |
---|
PerMessageDeflateExtension() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
The
Sec-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() |
decompress, doStop, endsWithTail, forwardIncoming, getDeflater, getInflater, isRsv1User, newByteAccumulator, notifyCallbackFailure, notifyCallbackSuccess, outgoingFrame
getBufferPool, getConfig, getConnection, getNextIncoming, getNextOutgoing, getPolicy, init, init, isRsv2User, isRsv3User, setBufferPool, setConnection, setNextIncomingFrames, setNextOutgoingFrames, setPolicy
addLifeCycleListener, doStart, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
private static final Logger LOG
private ExtensionConfig configRequested
private ExtensionConfig configNegotiated
private boolean incomingContextTakeover
private boolean outgoingContextTakeover
private boolean incomingCompressed
public java.lang.String getName()
Extension
Sec-WebSocket-Extensions
name for this extension.
Also known as the extension-token
per Section 9.1. Negotiating Extensions.
getName
in interface Extension
getName
in class AbstractExtension
public void incomingFrame(Frame frame)
IncomingFrames
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.
frame
- the frame to processprotected void nextIncomingFrame(Frame frame)
nextIncomingFrame
in class AbstractExtension
protected void nextOutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
nextOutgoingFrame
in class AbstractExtension
int getRsvUseMode()
CompressExtension
getRsvUseMode
in class CompressExtension
CompressExtension.RSV_USE_ALWAYS
or CompressExtension.RSV_USE_ONLY_FIRST
int getTailDropMode()
CompressExtension
getTailDropMode
in class CompressExtension
CompressExtension.TAIL_DROP_ALWAYS
, CompressExtension.TAIL_DROP_FIN_ONLY
, or CompressExtension.TAIL_DROP_NEVER
public void setConfig(ExtensionConfig config)
setConfig
in class AbstractExtension
public java.lang.String toString()
toString
in class CompressExtension