public interface Extension extends IncomingFrames, OutgoingFrames
That work is performed by the two FrameHandler
implementations for incoming and outgoing frame handling.
Modifier and Type | Method and Description |
---|---|
ExtensionConfig |
getConfig()
The active configuration for this extension.
|
String |
getName()
The
Sec-WebSocket-Extensions name for this extension. |
boolean |
isRsv1User()
Used to indicate that the extension makes use of the RSV1 bit of the base websocket framing.
|
boolean |
isRsv2User()
Used to indicate that the extension makes use of the RSV2 bit of the base websocket framing.
|
boolean |
isRsv3User()
Used to indicate that the extension makes use of the RSV3 bit of the base websocket framing.
|
boolean |
isTextDataDecoder()
Used to indicate that the extension works as a decoder of TEXT Data Frames.
|
void |
setNextIncomingFrames(IncomingFrames nextIncoming)
Set the next
IncomingFrames to call in the chain. |
void |
setNextOutgoingFrames(OutgoingFrames nextOutgoing)
Set the next
OutgoingFrames to call in the chain. |
incomingError, incomingFrame
outgoingFrame
ExtensionConfig getConfig()
String getName()
Sec-WebSocket-Extensions
name for this extension.
Also known as the extension-token
per Section 9.1. Negotiating Extensions.
boolean isRsv1User()
This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV1.
boolean isRsv2User()
This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV2.
boolean isRsv3User()
This is used to adjust validation during parsing, as well as a checkpoint against 2 or more extensions all simultaneously claiming ownership of RSV3.
boolean isTextDataDecoder()
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.
void setNextIncomingFrames(IncomingFrames nextIncoming)
IncomingFrames
to call in the chain.nextIncoming
- the next incoming extensionvoid setNextOutgoingFrames(OutgoingFrames nextOutgoing)
OutgoingFrames
to call in the chain.nextOutgoing
- the next outgoing extensionCopyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.