Class DeflateFrameClientExtensionHandshaker
java.lang.Object
io.netty.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
ConstructorsConstructorDescriptionDeflateFrameClientExtensionHandshaker(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
Modifier and TypeMethodDescriptionhandshakeExtension(WebSocketExtensionData extensionData) Handshake based on server response.Return extension configuration to submit to the server.
-
Constructor Details
-
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 Details
-
newRequestData
Description copied from interface:WebSocketClientExtensionHandshakerReturn extension configuration to submit to the server.- Specified by:
newRequestDatain interfaceWebSocketClientExtensionHandshaker- Returns:
- the desired extension configuration.
-
handshakeExtension
Description copied from interface:WebSocketClientExtensionHandshakerHandshake based on server response. It should always succeed because server response should be a request acknowledge.- Specified by:
handshakeExtensionin interfaceWebSocketClientExtensionHandshaker- Parameters:
extensionData- the extension configuration sent by the server.- Returns:
- an initialized extension if handshake phase succeed or null if failed.
-