public class MessageCompressionExtension extends AbstractExtension
Attempts to follow draft-ietf-hybi-permessage-compression-01
AbstractLifeCycle.AbstractLifeCycleListener
Container.InheritedListener, Container.Listener
LifeCycle.Listener
Constructor and Description |
---|
MessageCompressionExtension() |
Modifier and Type | Method and Description |
---|---|
void |
incomingFrame(Frame frame) |
boolean |
isRsv1User()
Indicates use of RSV1 flag for indicating deflation is in use.
|
boolean |
isTextDataDecoder()
Used to indicate that the extension works as a decoder of TEXT Data Frames.
|
void |
outgoingFrame(Frame frame,
WriteCallback callback)
A frame, and optional callback, intended for the network.
|
void |
setConfig(ExtensionConfig config) |
String |
toString() |
dump, dumpWithHeading, getBufferPool, getConfig, getConnection, getName, getNextIncoming, getNextOutgoing, getPolicy, incomingError, isRsv2User, isRsv3User, nextIncomingError, nextIncomingFrame, nextOutgoingFrame, setBufferPool, setConnection, setNextIncomingFrames, setNextOutgoingFrames, setPolicy
addBean, addBean, addBean, addEventListener, contains, destroy, doStart, doStop, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public void incomingFrame(Frame frame)
public boolean isRsv1User()
isRsv1User
in interface Extension
isRsv1User
in class AbstractExtension
public boolean isTextDataDecoder()
AbstractExtension
This is used to adjust validation during parsing/generating, as per spec TEXT Data Frames can only contain UTF8 encoded String data.
Example: a compression extension will process a compressed set of text data, the parser/generator should no longer be concerned about the validity of the TEXT Data Frames as this is now the responsibility of the extension.
isTextDataDecoder
in interface Extension
isTextDataDecoder
in class AbstractExtension
public void outgoingFrame(Frame frame, WriteCallback callback)
OutgoingFrames
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.
frame
- the frame to eventually write to the network.callback
- the optional callback to use for success/failure of the network write operation. Can be null.public void setConfig(ExtensionConfig config)
setConfig
in class AbstractExtension
public String toString()
toString
in class AbstractExtension
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.