Class DeflateFrameServerExtensionHandshaker
java.lang.Object
io.netty.handler.codec.http.websocketx.extensions.compression.DeflateFrameServerExtensionHandshaker
- All Implemented Interfaces:
WebSocketServerExtensionHandshaker
public final class DeflateFrameServerExtensionHandshaker
extends Object
implements WebSocketServerExtensionHandshaker
perframe-deflate
handshake implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
(package private) static final String
private final WebSocketExtensionFilterProvider
(package private) static final String
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor with default configuration.DeflateFrameServerExtensionHandshaker
(int compressionLevel) Constructor with custom configuration.DeflateFrameServerExtensionHandshaker
(int compressionLevel, WebSocketExtensionFilterProvider extensionFilterProvider) Constructor with custom configuration. -
Method Summary
Modifier and TypeMethodDescriptionhandshakeExtension
(WebSocketExtensionData extensionData) Handshake based on client request.
-
Field Details
-
X_WEBKIT_DEFLATE_FRAME_EXTENSION
- See Also:
-
DEFLATE_FRAME_EXTENSION
- See Also:
-
compressionLevel
private final int compressionLevel -
extensionFilterProvider
-
-
Constructor Details
-
DeflateFrameServerExtensionHandshaker
public DeflateFrameServerExtensionHandshaker()Constructor with default configuration. -
DeflateFrameServerExtensionHandshaker
public DeflateFrameServerExtensionHandshaker(int compressionLevel) Constructor with custom configuration.- Parameters:
compressionLevel
- Compression level between 0 and 9 (default is 6).
-
DeflateFrameServerExtensionHandshaker
public DeflateFrameServerExtensionHandshaker(int compressionLevel, WebSocketExtensionFilterProvider extensionFilterProvider) Constructor with custom configuration.- Parameters:
compressionLevel
- Compression level between 0 and 9 (default is 6).extensionFilterProvider
- provides server extension filters for per frame deflate encoder and decoder.
-
-
Method Details
-
handshakeExtension
Description copied from interface:WebSocketServerExtensionHandshaker
Handshake based on client request. It must failed with null if server cannot handle it.- Specified by:
handshakeExtension
in interfaceWebSocketServerExtensionHandshaker
- Parameters:
extensionData
- the extension configuration sent by the client.- Returns:
- an initialized extension if handshake phase succeed or null if failed.
-