public int getResponseCompressionThreshold(MessageHeaders message) throws CompressionException { String responseCompressionThreshold = message.getHeader(HttpConstants.HEADER_RESPONSE_COMPRESSION_THRESHOLD); // If Response-Compression-Threshold header is present, use that value. If not, use the value in _defaultResponseCompressionConfig. if (responseCompressionThreshold != null) { try { return Integer.parseInt(responseCompressionThreshold); } catch (NumberFormatException e) { throw new CompressionException(CompressionConstants.INVALID_THRESHOLD + responseCompressionThreshold); } } return _defaultResponseCompressionConfig.getCompressionThreshold(); } }
public int getResponseCompressionThreshold(MessageHeaders message) throws CompressionException { String responseCompressionThreshold = message.getHeader(HttpConstants.HEADER_RESPONSE_COMPRESSION_THRESHOLD); // If Response-Compression-Threshold header is present, use that value. If not, use the value in _defaultResponseCompressionConfig. if (responseCompressionThreshold != null) { try { return Integer.parseInt(responseCompressionThreshold); } catch (NumberFormatException e) { throw new CompressionException(CompressionConstants.INVALID_THRESHOLD + responseCompressionThreshold); } } return _defaultResponseCompressionConfig.getCompressionThreshold(); } }