public abstract class Extension extends Object implements OutgoingFrames, IncomingFrames
Constructor and Description |
---|
Extension() |
Modifier and Type | Method and Description |
---|---|
ByteBufferPool |
getBufferPool() |
ExtensionConfig |
getConfig() |
String |
getName() |
IncomingFrames |
getNextIncomingFrames() |
OutgoingFrames |
getNextOutgoingFrames() |
String |
getParameterizedName() |
WebSocketPolicy |
getPolicy() |
void |
incoming(WebSocketException e) |
void |
incoming(WebSocketFrame frame) |
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 |
nextIncoming(WebSocketException e)
Convenience method for
#getNextIncomingFrames()#incoming(WebSocketException) |
void |
nextIncoming(WebSocketFrame frame)
Convenience method for
#getNextIncomingFrames()#incoming(WebSocketFrame) |
<C> void |
nextOutput(C context,
Callback<C> callback,
WebSocketFrame frame)
Convenience method for
#getNextOutgoingFrames()#output(WebSocketFrame) |
<C> void |
nextOutputNoCallback(WebSocketFrame frame) |
<C> void |
output(C context,
Callback<C> callback,
WebSocketFrame frame) |
void |
setBufferPool(ByteBufferPool bufferPool) |
void |
setConfig(ExtensionConfig config) |
void |
setNextIncomingFrames(IncomingFrames nextIncomingFramesHandler) |
void |
setNextOutgoingFrames(OutgoingFrames nextOutgoingFramesHandler) |
void |
setPolicy(WebSocketPolicy policy) |
public ByteBufferPool getBufferPool()
public ExtensionConfig getConfig()
public String getName()
public IncomingFrames getNextIncomingFrames()
public OutgoingFrames getNextOutgoingFrames()
public String getParameterizedName()
public WebSocketPolicy getPolicy()
public void incoming(WebSocketException e)
incoming
in interface IncomingFrames
public void incoming(WebSocketFrame frame)
incoming
in interface IncomingFrames
public 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.
public 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.
public 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.
public 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.
public void nextIncoming(WebSocketException e)
#getNextIncomingFrames()#incoming(WebSocketException)
e
- the exception to pass to the next input/incomingpublic void nextIncoming(WebSocketFrame frame)
#getNextIncomingFrames()#incoming(WebSocketFrame)
frame
- the frame to send to the next input/incomingpublic <C> void nextOutput(C context, Callback<C> callback, WebSocketFrame frame) throws IOException
#getNextOutgoingFrames()#output(WebSocketFrame)
frame
- the frame to send to the next outputIOException
public <C> void nextOutputNoCallback(WebSocketFrame frame) throws IOException
IOException
public <C> void output(C context, Callback<C> callback, WebSocketFrame frame) throws IOException
output
in interface OutgoingFrames
IOException
public void setBufferPool(ByteBufferPool bufferPool)
public void setConfig(ExtensionConfig config)
public void setNextIncomingFrames(IncomingFrames nextIncomingFramesHandler)
public void setNextOutgoingFrames(OutgoingFrames nextOutgoingFramesHandler)
public void setPolicy(WebSocketPolicy policy)
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.