Module io.netty5.codec.http
Class DeflateFrameServerExtensionHandshaker
- java.lang.Object
-
- io.netty5.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
Constructors Constructor Description DeflateFrameServerExtensionHandshaker()
Constructor with default configuration.DeflateFrameServerExtensionHandshaker(int compressionLevel)
Constructor with custom configuration.DeflateFrameServerExtensionHandshaker(int compressionLevel, WebSocketExtensionFilterProvider extensionFilterProvider)
Constructor with custom configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketServerExtension
handshakeExtension(WebSocketExtensionData extensionData)
Handshake based on client request.
-
-
-
Constructor Detail
-
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 Detail
-
handshakeExtension
public WebSocketServerExtension handshakeExtension(WebSocketExtensionData extensionData)
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.
-
-