Class DefaultHttp2HeadersDecoder

    • Field Detail

      • HEADERS_COUNT_WEIGHT_NEW

        private static final float HEADERS_COUNT_WEIGHT_NEW
        See Also:
        Constant Field Values
      • HEADERS_COUNT_WEIGHT_HISTORICAL

        private static final float HEADERS_COUNT_WEIGHT_HISTORICAL
        See Also:
        Constant Field Values
      • validateHeaders

        private final boolean validateHeaders
      • maxHeaderListSizeGoAway

        private long maxHeaderListSizeGoAway
      • headerArraySizeAccumulator

        private float headerArraySizeAccumulator
        Used to calculate an exponential moving average of header sizes to get an estimate of how large the data structure for storing headers should be.
    • Constructor Detail

      • DefaultHttp2HeadersDecoder

        public DefaultHttp2HeadersDecoder()
      • DefaultHttp2HeadersDecoder

        public DefaultHttp2HeadersDecoder​(boolean validateHeaders)
      • DefaultHttp2HeadersDecoder

        public DefaultHttp2HeadersDecoder​(boolean validateHeaders,
                                          long maxHeaderListSize)
        Create a new instance.
        Parameters:
        validateHeaders - true to validate headers are valid according to the RFC.
        maxHeaderListSize - This is the only setting that can be configured before notifying the peer. This is because SETTINGS_MAX_HEADER_LIST_SIZE allows a lower than advertised limit from being enforced, and the default limit is unlimited (which is dangerous).
      • DefaultHttp2HeadersDecoder

        public DefaultHttp2HeadersDecoder​(boolean validateHeaders,
                                          long maxHeaderListSize,
                                          @Deprecated
                                          int initialHuffmanDecodeCapacity)
        Create a new instance.
        Parameters:
        validateHeaders - true to validate headers are valid according to the RFC.
        maxHeaderListSize - This is the only setting that can be configured before notifying the peer. This is because SETTINGS_MAX_HEADER_LIST_SIZE allows a lower than advertised limit from being enforced, and the default limit is unlimited (which is dangerous).
        initialHuffmanDecodeCapacity - Does nothing, do not use.
      • DefaultHttp2HeadersDecoder

        DefaultHttp2HeadersDecoder​(boolean validateHeaders,
                                   HpackDecoder hpackDecoder)
        Exposed Used for testing only! Default values used in the initial settings frame are overridden intentionally for testing but violate the RFC if used outside the scope of testing.