| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final String | |
| private static final String | |
| private static final int | |
| private boolean | |
| private final int | |
| private final Deflater | |
| private static final String | |
| private final Inflater | |
| private Map | |
| private static final String | |
| private static final String | |
| private static final int | |
| private boolean | |
| private static final byte[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | PerMessageDeflateExtension()
Constructor for the PerMessage Deflate Extension (7. Thepermessage-deflate" Extension)
Uses |
| public | PerMessageDeflateExtension(int
The compression level passed to the compressionLevel)java.Constructor for the PerMessage Deflate Extension (7. Thepermessage-deflate" Extension) |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | acceptProvidedExtensionAsClient(String inputExtension)
Overrides org. Implements org. Check if the received Sec-WebSocket-Extensions header field contains a offer for the specific extension if the endpoint is in the role of a client |
| public boolean | acceptProvidedExtensionAsServer(String inputExtension)
Overrides org. Implements org. Check if the received Sec-WebSocket-Extensions header field contains a offer for the specific extension if the endpoint is in the role of a server |
| public IExtension | copyInstance()
Overrides org. Implements org. Extensions must only be by one websocket at all. |
| public void | decodeFrame(Framedata inputFrame)
Overrides org. Implements org. Decode a frame with a extension specific algorithm. |
| private void | |
| public void | encodeFrame(Framedata inputFrame)
Overrides org. Implements org. Encode a frame with a extension specific algorithm. |
| private static boolean | |
| public int | Returns: the compression levelGet the compression level used for the compressor. |
| public String | getProvidedExtensionAsClient()
Overrides org. Implements org. Return the specific Sec-WebSocket-Extensions header offer for this extension if the endpoint is in the role of a client. |
| public String | getProvidedExtensionAsServer()
Overrides org. Implements org. Return the specific Sec-WebSocket-Extensions header offer for this extension if the endpoint is in the role of a server. |
| public int | Returns: Size (in bytes) below which messages will not be compressedGet the size threshold for doing the compression |
| public boolean | Returns: clientNoContextTakeover is the client no context parameter activeAccess the "client_no_context_takeover" extension parameter |
| public void | isFrameValid(Framedata inputFrame)
Overrides org. Implements org. This extension requires the RSV1 bit to be set only for the first frame. |
| public boolean | Returns: serverNoContextTakeover is the server no context parameter activeAccess the "server_no_context_takeover" extension parameter |
| public void | setClientNoContextTakeover(boolean
set the client no context parameter clientNoContextTakeover)Setter for the "client_no_context_takeover" extension parameter |
| public void | setServerNoContextTakeover(boolean
set the server no context parameter serverNoContextTakeover)Setter for the "server_no_context_takeover" extension parameter |
| public void | setThreshold(int
the size in bytes threshold)Set the size when payloads smaller than this will not be compressed. |
| public String | toString()
Overrides org. Implements org. Return a string which should contain the class name as well as additional information about the current configurations for this extension (DEBUG purposes) |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| CLIENT_MAX_WINDOW_BITS | back to summary |
|---|---|
| private static final String CLIENT_MAX_WINDOW_BITS | |
| CLIENT_NO_CONTEXT_TAKEOVER | back to summary |
|---|---|
| private static final String CLIENT_NO_CONTEXT_TAKEOVER | |
| clientMaxWindowBits | back to summary |
|---|---|
| private static final int clientMaxWindowBits | |
| clientNoContextTakeover | back to summary |
|---|---|
| private boolean clientNoContextTakeover | |
| compressionLevel | back to summary |
|---|---|
| private final int compressionLevel | |
| deflater | back to summary |
|---|---|
| private final Deflater deflater | |
| EXTENSION_REGISTERED_NAME | back to summary |
|---|---|
| private static final String EXTENSION_REGISTERED_NAME | |
| inflater | back to summary |
|---|---|
| private final Inflater inflater | |
| requestedParameters | back to summary |
|---|---|
| private Map<String, String> requestedParameters | |
| SERVER_MAX_WINDOW_BITS | back to summary |
|---|---|
| private static final String SERVER_MAX_WINDOW_BITS | |
| SERVER_NO_CONTEXT_TAKEOVER | back to summary |
|---|---|
| private static final String SERVER_NO_CONTEXT_TAKEOVER | |
| serverMaxWindowBits | back to summary |
|---|---|
| private static final int serverMaxWindowBits | |
| serverNoContextTakeover | back to summary |
|---|---|
| private boolean serverNoContextTakeover | |
| TAIL_BYTES | back to summary |
|---|---|
| private static final byte[] TAIL_BYTES | |
| threshold | back to summary |
|---|---|
| private int threshold | |
| PerMessageDeflateExtension | back to summary |
|---|---|
| public PerMessageDeflateExtension() Constructor for the PerMessage Deflate Extension (7. Thepermessage-deflate" Extension)
Uses | |
| PerMessageDeflateExtension | back to summary |
|---|---|
| public PerMessageDeflateExtension(int compressionLevel) Constructor for the PerMessage Deflate Extension (7. Thepermessage-deflate" Extension)
| |
| acceptProvidedExtensionAsClient | back to summary |
|---|---|
| public boolean acceptProvidedExtensionAsClient(String inputExtension) Overrides org. Implements org. Doc from org. Check if the received Sec-WebSocket-Extensions header field contains a offer for the specific extension if the endpoint is in the role of a client
| |
| acceptProvidedExtensionAsServer | back to summary |
|---|---|
| public boolean acceptProvidedExtensionAsServer(String inputExtension) Overrides org. Implements org. Doc from org. Check if the received Sec-WebSocket-Extensions header field contains a offer for the specific extension if the endpoint is in the role of a server
| |
| copyInstance | back to summary |
|---|---|
| public IExtension copyInstance() Overrides org. Implements org. Doc from org. Extensions must only be by one websocket at all. To prevent extensions to be used more than
once the Websocket implementation should call this method in order to create a new usable
version of a given extension instance.
| |
| decodeFrame | back to summary |
|---|---|
| public void decodeFrame(Framedata inputFrame) throws InvalidDataException Overrides org. Implements org. Doc from org. Decode a frame with a extension specific algorithm. The algorithm is subject to be implemented by the specific extension. The resulting frame will be used in the application
| |
| decompress | back to summary |
|---|---|
private void decompress(byte[] data, ByteArrayOutputStream outputBuffer) throws DataFormatException
| |
| encodeFrame | back to summary |
|---|---|
| public void encodeFrame(Framedata inputFrame) Overrides org. Implements org. Doc from org. Encode a frame with a extension specific algorithm. The algorithm is subject to be implemented by the specific extension. The resulting frame will be send to the other endpoint.
| |
| endsWithTail | back to summary |
|---|---|
private static boolean endsWithTail(byte[] data)
| |
| getCompressionLevel | back to summary |
|---|---|
| public int getCompressionLevel() Get the compression level used for the compressor.
| |
| getProvidedExtensionAsClient | back to summary |
|---|---|
| public String getProvidedExtensionAsClient() Overrides org. Implements org. Doc from org. Return the specific Sec-WebSocket-Extensions header offer for this extension if the endpoint is in the role of a client. If the extension returns an empty string (""), the offer will not be included in the handshake.
| |
| getProvidedExtensionAsServer | back to summary |
|---|---|
| public String getProvidedExtensionAsServer() Overrides org. Implements org. Doc from org. Return the specific Sec-WebSocket-Extensions header offer for this extension if the endpoint is in the role of a server. If the extension returns an empty string (""), the offer will not be included in the handshake.
| |
| getThreshold | back to summary |
|---|---|
| public int getThreshold() Get the size threshold for doing the compression
| |
| isClientNoContextTakeover | back to summary |
|---|---|
| public boolean isClientNoContextTakeover() Access the "client_no_context_takeover" extension parameter
| |
| isFrameValid | back to summary |
|---|---|
| public void isFrameValid(Framedata inputFrame) throws InvalidDataException Overrides org. Implements org. This extension requires the RSV1 bit to be set only for the first frame. If the frame is type is CONTINUOUS, RSV1 bit must be unset.
| |
| isServerNoContextTakeover | back to summary |
|---|---|
| public boolean isServerNoContextTakeover() Access the "server_no_context_takeover" extension parameter
| |
| setClientNoContextTakeover | back to summary |
|---|---|
| public void setClientNoContextTakeover(boolean clientNoContextTakeover) Setter for the "client_no_context_takeover" extension parameter
| |
| setServerNoContextTakeover | back to summary |
|---|---|
| public void setServerNoContextTakeover(boolean serverNoContextTakeover) Setter for the "server_no_context_takeover" extension parameter
| |
| setThreshold | back to summary |
|---|---|
| public void setThreshold(int threshold) Set the size when payloads smaller than this will not be compressed.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Implements org. Doc from org. Return a string which should contain the class name as well as additional information about the current configurations for this extension (DEBUG purposes)
| |