Module io.netty5.codec.http
Class DeflateFrameClientExtensionHandshaker
- java.lang.Object
-
- io.netty5.handler.codec.http.websocketx.extensions.compression.DeflateFrameClientExtensionHandshaker
-
- All Implemented Interfaces:
WebSocketClientExtensionHandshaker
public final class DeflateFrameClientExtensionHandshaker extends Object implements WebSocketClientExtensionHandshaker
perframe-deflate handshake implementation.
-
-
Constructor Summary
Constructors Constructor Description DeflateFrameClientExtensionHandshaker(boolean useWebkitExtensionName)
Constructor with default configuration.DeflateFrameClientExtensionHandshaker(int compressionLevel, boolean useWebkitExtensionName)
Constructor with custom configuration.DeflateFrameClientExtensionHandshaker(int compressionLevel, boolean useWebkitExtensionName, WebSocketExtensionFilterProvider extensionFilterProvider)
Constructor with custom configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketClientExtension
handshakeExtension(WebSocketExtensionData extensionData)
Handshake based on server response.WebSocketExtensionData
newRequestData()
Return extension configuration to submit to the server.
-
-
-
Constructor Detail
-
DeflateFrameClientExtensionHandshaker
public DeflateFrameClientExtensionHandshaker(boolean useWebkitExtensionName)
Constructor with default configuration.
-
DeflateFrameClientExtensionHandshaker
public DeflateFrameClientExtensionHandshaker(int compressionLevel, boolean useWebkitExtensionName)
Constructor with custom configuration.- Parameters:
compressionLevel
- Compression level between 0 and 9 (default is 6).
-
DeflateFrameClientExtensionHandshaker
public DeflateFrameClientExtensionHandshaker(int compressionLevel, boolean useWebkitExtensionName, WebSocketExtensionFilterProvider extensionFilterProvider)
Constructor with custom configuration.- Parameters:
compressionLevel
- Compression level between 0 and 9 (default is 6).extensionFilterProvider
- provides client extension filters for per frame deflate encoder and decoder.
-
-
Method Detail
-
newRequestData
public WebSocketExtensionData newRequestData()
Description copied from interface:WebSocketClientExtensionHandshaker
Return extension configuration to submit to the server.- Specified by:
newRequestData
in interfaceWebSocketClientExtensionHandshaker
- Returns:
- the desired extension configuration.
-
handshakeExtension
public WebSocketClientExtension handshakeExtension(WebSocketExtensionData extensionData)
Description copied from interface:WebSocketClientExtensionHandshaker
Handshake based on server response. It should always succeed because server response should be a request acknowledge.- Specified by:
handshakeExtension
in interfaceWebSocketClientExtensionHandshaker
- Parameters:
extensionData
- the extension configuration sent by the server.- Returns:
- an initialized extension if handshake phase succeed or null if failed.
-
-