Class CompressExtension
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.extensions.AbstractExtension
org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension
- All Implemented Interfaces:
LifeCycle,Extension,IncomingFrames,OutgoingFrames
- Direct Known Subclasses:
DeflateFrameExtension,PerMessageDeflateExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicIntegerprotected static final intInflater / Decompressed Buffer Sizeprotected static final intDeflater / Inflater: Maximum Input Buffer Sizeprotected static final intAlways set RSV flag, on all frame typesprotected static final intOnly set RSV flag on first frame in multi-frame messages.protected static final byte[]protected static final ByteBufferprotected static final intAlways drop tail bytes 0000FFFF, from all frame typesprotected static final intOnly drop tail bytes 0000FFFF, from fin==true framesprotected static final intNever drop tail bytes 0000FFFF, from any frame type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecompress(ByteAccumulator accumulator, ByteBuffer buf) protected voiddoStop()static booleanendsWithTail(ByteBuffer buf) protected voidforwardIncoming(Frame frame, ByteAccumulator accumulator) booleanIndicates use of RSV1 flag for indicating deflation is in use.protected ByteAccumulatorprotected voidnotifyCallbackFailure(WriteCallback callback, Throwable failure) protected voidnotifyCallbackSuccess(WriteCallback callback) voidoutgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode) voidsetDeflaterPool(DeflaterPool deflaterPool) voidsetInflaterPool(InflaterPool inflaterPool) toString()Methods inherited from class org.eclipse.jetty.websocket.common.extensions.AbstractExtension
getBufferPool, getConfig, getConnection, getName, getNextIncoming, getNextOutgoing, getPolicy, init, init, isRsv2User, isRsv3User, nextIncomingFrame, nextOutgoingFrame, setBufferPool, setConfig, 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, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.websocket.api.extensions.IncomingFrames
incomingFrame
-
Field Details
-
TAIL_BYTES
protected static final byte[] TAIL_BYTES -
TAIL_BYTES_BUF
-
TAIL_DROP_NEVER
protected static final int TAIL_DROP_NEVERNever drop tail bytes 0000FFFF, from any frame type- See Also:
-
TAIL_DROP_ALWAYS
protected static final int TAIL_DROP_ALWAYSAlways drop tail bytes 0000FFFF, from all frame types- See Also:
-
TAIL_DROP_FIN_ONLY
protected static final int TAIL_DROP_FIN_ONLYOnly drop tail bytes 0000FFFF, from fin==true frames- See Also:
-
RSV_USE_ALWAYS
protected static final int RSV_USE_ALWAYSAlways set RSV flag, on all frame types- See Also:
-
RSV_USE_ONLY_FIRST
protected static final int RSV_USE_ONLY_FIRSTOnly set RSV flag on first frame in multi-frame messages.Note: this automatically means no-continuation frames have the RSV bit set
- See Also:
-
INFLATE_BUFFER_SIZE
protected static final int INFLATE_BUFFER_SIZEInflater / Decompressed Buffer Size- See Also:
-
INPUT_MAX_BUFFER_SIZE
protected static final int INPUT_MAX_BUFFER_SIZEDeflater / Inflater: Maximum Input Buffer Size- See Also:
-
decompressCount
-
-
Constructor Details
-
CompressExtension
protected CompressExtension()
-
-
Method Details
-
setInflaterPool
-
setDeflaterPool
-
getDeflater
-
getInflater
-
isRsv1User
public boolean isRsv1User()Indicates use of RSV1 flag for indicating deflation is in use.- Specified by:
isRsv1Userin interfaceExtension- Overrides:
isRsv1Userin classAbstractExtension- Returns:
- true if extension uses RSV1 for its own purposes.
-
forwardIncoming
-
newByteAccumulator
-
decompress
- Throws:
DataFormatException
-
outgoingFrame
-
notifyCallbackSuccess
-
notifyCallbackFailure
-
endsWithTail
-
doStop
- Overrides:
doStopin classAbstractLifeCycle- Throws:
Exception
-
toString
- Overrides:
toStringin classAbstractExtension
-