Class DeflateFrameServerExtensionHandshaker

java.lang.Object
io.netty.handler.codec.http.websocketx.extensions.compression.DeflateFrameServerExtensionHandshaker
All Implemented Interfaces:
WebSocketServerExtensionHandshaker

public final class DeflateFrameServerExtensionHandshaker extends java.lang.Object implements WebSocketServerExtensionHandshaker
perframe-deflate handshake implementation.
  • Field Details

    • DEFAULT_COMPRESSION_LEVEL

      public static final int DEFAULT_COMPRESSION_LEVEL
      See Also:
    • MIN_WINDOW_SIZE

      public static final int MIN_WINDOW_SIZE
      See Also:
    • MAX_WINDOW_SIZE

      public static final int MAX_WINDOW_SIZE
      See Also:
    • DEFAULT_MEM_LEVEL

      public static final int DEFAULT_MEM_LEVEL
      See Also:
    • MIN_MEM_LEVEL

      public static final int MIN_MEM_LEVEL
      See Also:
    • MAX_MEM_LEVEL

      public static final int MAX_MEM_LEVEL
      See Also:
    • X_WEBKIT_DEFLATE_FRAME_EXTENSION

      static final java.lang.String X_WEBKIT_DEFLATE_FRAME_EXTENSION
      See Also:
    • DEFLATE_FRAME_EXTENSION

      static final java.lang.String DEFLATE_FRAME_EXTENSION
      See Also:
    • compressionLevel

      private final int compressionLevel
    • windowSize

      private final int windowSize
    • memLevel

      private final int memLevel
    • extensionFilterProvider

      private final WebSocketExtensionFilterProvider extensionFilterProvider
    • maxAllocation

      private final int maxAllocation
  • Constructor Details

    • DeflateFrameServerExtensionHandshaker

      @Deprecated public DeflateFrameServerExtensionHandshaker()
      Constructor with default configuration.
    • DeflateFrameServerExtensionHandshaker

      @Deprecated public DeflateFrameServerExtensionHandshaker(int compressionLevel)
      Constructor with custom configuration.
      Parameters:
      compressionLevel - Compression level between 0 and 9 (default is 6).
    • DeflateFrameServerExtensionHandshaker

      public DeflateFrameServerExtensionHandshaker(int compressionLevel, int maxAllocation)
      Constructor with custom configuration.
      Parameters:
      compressionLevel - Compression level between 0 and 9 (default is 6).
      maxAllocation - Maximum size of the decompression buffer. Must be >= 0. If zero, maximum size is not limited.
    • DeflateFrameServerExtensionHandshaker

      public DeflateFrameServerExtensionHandshaker(int compressionLevel, int windowSize, int memLevel, int maxAllocation)
      Constructor with custom configuration including compressor memory limits.
      Parameters:
      compressionLevel - Compression level between 0 and 9 (default is 6).
      windowSize - zlib window size in bits (8-15) for the server-side deflater. Lower values reduce per-connection memory at the cost of compression ratio.
      memLevel - zlib memory level for the server-side deflater (1-9). Lower values reduce per-connection memory at the cost of compression ratio.
      maxAllocation - Maximum size of the decompression buffer. Must be >= 0. If zero, maximum size is not limited.
    • DeflateFrameServerExtensionHandshaker

      @Deprecated 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.
    • DeflateFrameServerExtensionHandshaker

      @Deprecated public DeflateFrameServerExtensionHandshaker(int compressionLevel, WebSocketExtensionFilterProvider extensionFilterProvider, int maxAllocation)
      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.
      maxAllocation - Maximum size of the decompression buffer. Must be >= 0. If zero, maximum size is not limited.
    • DeflateFrameServerExtensionHandshaker

      public DeflateFrameServerExtensionHandshaker(int compressionLevel, int windowSize, int memLevel, WebSocketExtensionFilterProvider extensionFilterProvider, int maxAllocation)
      Constructor with full custom configuration.
      Parameters:
      compressionLevel - Compression level between 0 and 9 (default is 6).
      windowSize - zlib window size in bits (8-15) for the server-side deflater.
      memLevel - zlib memory level for the server-side deflater (1-9).
      extensionFilterProvider - provides server extension filters for per frame deflate encoder and decoder.
      maxAllocation - Maximum size of the decompression buffer. Must be >= 0. If zero, maximum size is not limited.
  • Method Details