/** Instantiates a compression filter * that supports the compression methods in the given set in argument. * @param supportedEncoding */ public ServerStreamCompressionFilter(StreamEncodingType[] supportedEncoding, Executor executor, int compressThreshold) { _supportedEncoding = new HashSet<StreamEncodingType>(Arrays.asList(supportedEncoding)); _supportedEncoding.add(StreamEncodingType.IDENTITY); _supportedEncoding.add(StreamEncodingType.ANY); _executor = executor; _serverCompressionHelper = new ServerCompressionHelper(compressThreshold); }
/** Instantiates a compression filter * that supports the compression methods in the given set in argument. * @param supportedEncoding */ public ServerCompressionFilter(EncodingType[] supportedEncoding, CompressionConfig defaultResponseCompressionConfig) { if (defaultResponseCompressionConfig == null) { throw new IllegalArgumentException(CompressionConstants.NULL_CONFIG_ERROR); } _supportedEncoding = new HashSet<EncodingType>(Arrays.asList(supportedEncoding)); _supportedEncoding.add(EncodingType.IDENTITY); _supportedEncoding.add(EncodingType.ANY); _serverCompressionHelper = new ServerCompressionHelper(defaultResponseCompressionConfig); }
/** Instantiates a compression filter * that supports the compression methods in the given set in argument. * @param supportedEncoding */ public ServerStreamCompressionFilter(StreamEncodingType[] supportedEncoding, Executor executor, int compressThreshold) { _supportedEncoding = new HashSet<StreamEncodingType>(Arrays.asList(supportedEncoding)); _supportedEncoding.add(StreamEncodingType.IDENTITY); _supportedEncoding.add(StreamEncodingType.ANY); _executor = executor; _serverCompressionHelper = new ServerCompressionHelper(compressThreshold); }
/** Instantiates a compression filter * that supports the compression methods in the given set in argument. * @param supportedEncoding */ public ServerCompressionFilter(EncodingType[] supportedEncoding, CompressionConfig defaultResponseCompressionConfig) { if (defaultResponseCompressionConfig == null) { throw new IllegalArgumentException(CompressionConstants.NULL_CONFIG_ERROR); } _supportedEncoding = new HashSet<EncodingType>(Arrays.asList(supportedEncoding)); _supportedEncoding.add(EncodingType.IDENTITY); _supportedEncoding.add(EncodingType.ANY); _serverCompressionHelper = new ServerCompressionHelper(defaultResponseCompressionConfig); }