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.
-
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.
-
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:WebSocketServerExtensionHandshakerHandshake based on client request. It must failed with null if server cannot handle it.- Specified by:
handshakeExtensionin interfaceWebSocketServerExtensionHandshaker- Parameters:
extensionData- the extension configuration sent by the client.- Returns:
- an initialized extension if handshake phase succeed or null if failed.
-