public class PerMessageDeflate extends java.lang.Object implements Transformation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
Extension |
getExtensionResponse()
Obtain the extension that describes the information to be returned to the
client.
|
TransformationResult |
getMoreData(byte opCode,
boolean fin,
int rsv,
java.nio.ByteBuffer dest)
Obtain more input data.
|
java.util.List<org.apache.tomcat.websocket.MessagePart> |
sendMessagePart(java.util.List<org.apache.tomcat.websocket.MessagePart> uncompressedParts)
Takes the provided list of messages, transforms them, passes the
transformed list on to the next transformation (if any) and then returns
the resulting list of message parts after all of the transformations have
been applied.
|
void |
setNext(Transformation t)
Sets the next transformation in the pipeline.
|
boolean |
validateRsv(int rsv,
byte opCode)
Validates the RSV and opcode combination (assumed to have been extracted
from a WebSocket Frame) for this extension.
|
boolean |
validateRsvBits(int i)
Validate that the RSV bit(s) required by this transformation are not
being used by another extension.
|
public static final java.lang.String NAME
public TransformationResult getMoreData(byte opCode, boolean fin, int rsv, java.nio.ByteBuffer dest) throws java.io.IOException
Transformation
getMoreData
in interface Transformation
opCode
- The opcode for the frame currently being processedfin
- Is this the final frame in this WebSocket message?rsv
- The reserved bits for the frame currently being
processeddest
- The buffer in which the data is to be writtenjava.io.IOException
public boolean validateRsv(int rsv, byte opCode)
Transformation
validateRsv
in interface Transformation
rsv
- The RSV bits received as an int in the range zero to
seven with RSV1 as the MSB and RSV3 as the LSBopCode
- The opCode receivedtrue
if the RSV is valid otherwise
false
public Extension getExtensionResponse()
Transformation
getExtensionResponse
in interface Transformation
public void setNext(Transformation t)
Transformation
setNext
in interface Transformation
public boolean validateRsvBits(int i)
Transformation
validateRsvBits
in interface Transformation
i
- The RSV bits marked as in use so far as an int in the
range zero to seven with RSV1 as the MSB and RSV3 as the
LSBtrue
if the combination of RSV bits used by the
transformations in the pipeline do not conflict otherwise
false
public java.util.List<org.apache.tomcat.websocket.MessagePart> sendMessagePart(java.util.List<org.apache.tomcat.websocket.MessagePart> uncompressedParts)
Transformation
sendMessagePart
in interface Transformation
uncompressedParts
- The list of messages to be transformedCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.